Initializer

init(response:data:userInfo:storagePolicy:)

Creates a cached URL response instance with a given server response, data, user-info dictionary, and storage policy.

Declaration

init(response: URLResponse, data: Data, userInfo: [AnyHashable : Any]? = nil, storagePolicy: URLCache.StoragePolicy)

Parameters

response

The response to cache.

data

The data to cache.

userInfo

An optional dictionary of user information. May be nil.

storagePolicy

The storage policy for the cached response.

Return Value

A cached URL response object, containing the response and data.

See Also

Creating a Cached URL Response

init(response: URLResponse, data: Data)

Creates a cached URL response instance.

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