Contents

cachedResponse(for:)

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

Declaration

func cachedResponse(for request: URLRequest) -> CachedURLResponse?

Parameters

  • request:

    The URL request whose cached response is desired.

Mentioned in

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 getCachedResponse(for:completionHandler:).

See Also

Getting and storing cached objects