NSURLRequestCachePolicy enum

! @enum NSURLRequestCachePolicy

@discussion The NSURLRequestCachePolicy enum defines constants that can be used to specify the type of interactions that take place with the caching system when the URL loading system processes a request. Specifically, these constants cover interactions that have to do with whether already-existing cache data is returned to satisfy a URL load request.

@constant NSURLRequestUseProtocolCachePolicy 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.

@constant NSURLRequestReloadIgnoringLocalCacheData 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.

@constant NSURLRequestReloadIgnoringLocalAndRemoteCacheData 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.

@constant NSURLRequestReloadIgnoringCacheData Older name for NSURLRequestReloadIgnoringLocalCacheData.

@constant NSURLRequestReturnCacheDataElseLoad 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.

@constant NSURLRequestReturnCacheDataDontLoad 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.

@constant NSURLRequestReloadRevalidatingCacheData 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.

Inheritance
Available extensions

Values

NSURLRequestUseProtocolCachePolicy → const NSURLRequestCachePolicy
const NSURLRequestCachePolicy(0)
NSURLRequestReloadIgnoringLocalCacheData → const NSURLRequestCachePolicy
const NSURLRequestCachePolicy(1)
NSURLRequestReloadIgnoringLocalAndRemoteCacheData → const NSURLRequestCachePolicy
const NSURLRequestCachePolicy(4)
NSURLRequestReturnCacheDataElseLoad → const NSURLRequestCachePolicy
const NSURLRequestCachePolicy(2)
NSURLRequestReturnCacheDataDontLoad → const NSURLRequestCachePolicy
const NSURLRequestCachePolicy(3)
NSURLRequestReloadRevalidatingCacheData → const NSURLRequestCachePolicy
const NSURLRequestCachePolicy(5)

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value int
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fromValue(int value) NSURLRequestCachePolicy

Constants

NSURLRequestReloadIgnoringCacheData → const NSURLRequestCachePolicy
values → const List<NSURLRequestCachePolicy>
A constant List of the values in this enum, in order of their declaration.