ResponseCacher
public struct ResponseCacher
extension ResponseCacher: CachedResponseHandler
ResponseCacher
is a convenience CachedResponseHandler
making it easy to cache, not cache, or modify a cached
response.
-
Defines the behavior of the
See moreResponseCacher
type.Declaration
Swift
public enum Behavior : Sendable
-
Returns a
ResponseCacher
with a.cache
Behavior
.Declaration
Swift
public static let cache: ResponseCacher
-
Returns a
ResponseCacher
with a.doNotCache
Behavior
.Declaration
Swift
public static let doNotCache: ResponseCacher
-
Declaration
Swift
public func dataTask(_ task: URLSessionDataTask, willCacheResponse response: CachedURLResponse, completion: @escaping (CachedURLResponse?) -> Void)