Behavior

public enum Behavior : Sendable

Defines the behavior of the ResponseCacher type.

  • Stores the cached response in the cache.

    Declaration

    Swift

    case cache
  • Prevents the cached response from being stored in the cache.

    Declaration

    Swift

    case doNotCache
  • Modifies the cached response before storing it in the cache.

    Declaration

    Swift

    case modify(@Sendable (_ task: URLSessionDataTask, _ cachedResponse: CachedURLResponse) -> CachedURLResponse?)