Instance Method

initWithResponse:data:

Creates a cached URL response instance.

Declaration

- (instancetype)initWithResponse:(NSURLResponse *)response data:(NSData *)data;

Parameters

response

The response to cache.

data

The data to cache.

Return Value

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

Discussion

The cache storage policy is set to the default, NSURLCacheStorageAllowed, and the user info dictionary is set to nil.

See Also

Creating a Cached URL Response

- initWithResponse:data:userInfo:storagePolicy:

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