Instance Method

storeCachedResponse:forRequest:

Stores a cached URL response for a specified request.

Declaration

- (void)storeCachedResponse:(NSCachedURLResponse *)cachedResponse forRequest:(NSURLRequest *)request;

Parameters

cachedResponse

The cached URL response to store.

request

The request for which the cached URL response is being stored.

Discussion

If you override this method, you should also override storeCachedResponse:forDataTask:.

See Also

Getting and Storing Cached Objects

- cachedResponseForRequest:

Returns the cached URL response in the cache for the specified URL request.

- getCachedResponseForDataTask:completionHandler:

Gets the cached URL response for a data task, passing it to the provided completion handler.

- storeCachedResponse:forDataTask:

Stores a cached URL response for a specified data task.