#[repr(transparent)]pub struct NSURLRequestCachePolicy(pub NSUInteger);
NSURLRequest
only.Expand description
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.
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.
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.
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.
NSURLRequestReloadIgnoringLocalCacheData.
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.
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.
the existing cache data may be used provided the origin source confirms its validity, otherwise the URL is loaded from the origin source.
See also Apple’s documentation
Tuple Fields§
§0: NSUInteger
Implementations§
Source§impl NSURLRequestCachePolicy
impl NSURLRequestCachePolicy
pub const UseProtocolCachePolicy: Self
pub const ReloadIgnoringLocalCacheData: Self
pub const ReloadIgnoringLocalAndRemoteCacheData: Self
pub const ReloadIgnoringCacheData: Self
pub const ReturnCacheDataElseLoad: Self
pub const ReturnCacheDataDontLoad: Self
pub const ReloadRevalidatingCacheData: Self
Trait Implementations§
Source§impl Clone for NSURLRequestCachePolicy
impl Clone for NSURLRequestCachePolicy
Source§fn clone(&self) -> NSURLRequestCachePolicy
fn clone(&self) -> NSURLRequestCachePolicy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more