Instance Method

initWithResponse:data:userInfo:storagePolicy:

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

Declaration

- (instancetype)initWithResponse:(NSURLResponse *)response data:(NSData *)data userInfo:(NSDictionary *)userInfo storagePolicy:(NSURLCacheStoragePolicy)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

- initWithResponse:data:

Creates a cached URL response instance.