Instance Property

urlCache

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

Declaration

var urlCache: URLCache? { get set }

Discussion

This property determines the URL cache object used by tasks within sessions based on this configuration.

To disable caching, set this property to nil.

For default sessions, the default value is the shared URL cache object.

For background sessions, the default value is nil.

For ephemeral sessions, the default value is a private cache object that stores data in memory only, and is destroyed when you invalidate the session.

See Also

Setting Caching Policies

var requestCachePolicy: NSURLRequest.CachePolicy

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

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