Instance Property


A predefined constant that determines when to return a response from the cache.


@property NSURLRequestCachePolicy requestCachePolicy;


This property determines the request caching policy used by tasks within sessions based on this configuration.

Set this property to one of the constants defined in NSURLRequestCachePolicy to specify whether the cache policy should depend on expiration dates and age, whether the cache should be disabled entirely, and whether the server should be contacted to determine if the content has changed since it was last requested.

The default value is NSURLRequestUseProtocolCachePolicy.

See Also

Setting Caching Policies


The URL cache for providing cached responses to requests within the session.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software