Instance Method

storeCachedResponse:forDataTask:

Stores a cached URL response for a specified data task.

Declaration

- (void)storeCachedResponse:(NSCachedURLResponse *)cachedResponse forDataTask:(NSURLSessionDataTask *)dataTask;

Parameters

cachedResponse

The cached URL response to store for this data task.

dataTask

The data task whose response is to be cached.

See Also

Getting and Storing Cached Objects

- cachedResponseForRequest:

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

- 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.