EnumerationFoundationNetworking5.9.0
CachePolicy
enum CachePolicy
Citizens in FoundationNetworking
Conformances
protocol Equatable
A type that can be compared for value equality.
protocol Hashable
A type that can be hashed into a
Hasher
to produce an integer hash value.protocol RawRepresentable
A type that can be converted to and from an associated raw value.
Members
case reloadIgnoringLocalAndRemoteCacheData
Specifies that not only should the local cache data be ignored, but that proxies and other intermediates should be instructed to disregard their caches so far as the protocol allows. Unimplemented.
case reloadIgnoringLocalCacheData
Specifies that the data for the URL load should be loaded from the origin source. No existing local cache data, regardless of its freshness or validity, should be used to satisfy a URL load request.
case reloadRevalidatingCacheData
Specifies that the existing cache data may be used provided the origin source confirms its validity, otherwise the URL is loaded from the origin source.
case returnCacheDataDontLoad
Specifies that the existing cache data should be used to satisfy a URL load request, regardless of its age or expiration date. However, if there is no existing data in the cache corresponding to a URL load request, no attempt is made to load the URL from the origin source, and the load is considered to have failed. This constant specifies a behavior that is similar to an “offline” mode.
case returnCacheDataElseLoad
Specifies that the existing cache data should be used to satisfy a URL load request, regardless of its age or expiration date. However, if there is no existing data in the cache corresponding to a URL load request, the URL is loaded from the origin source.
case useProtocolCachePolicy
Specifies that the caching logic defined in the protocol implementation, if any, is used for a particular URL load request. This is the default policy for URL load requests.
init?(rawValue: UInt
) static var reloadIgnoringCacheData: NSURLRequest.CachePolicy
Older name for
NSURLRequestReloadIgnoringLocalCacheData
.