Instance Method

cachedResponseForRequest:

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

Declaration

- (NSCachedURLResponse *)cachedResponseForRequest:(NSURLRequest *)request;

Parameters

request

The URL request whose cached response is desired.

Return Value

The cached URL response for request, or nil if no response has been cached.

Discussion

If you override this method, you should also override getCachedResponseForDataTask:completionHandler:.

See Also

Getting and Storing Cached Objects

- storeCachedResponse:forRequest:

Stores a cached URL response for a specified 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.

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