Type Method

requestIsCacheEquivalent:toRequest:

A Boolean value indicating whether two requests are equivalent for cache purposes.

Declaration

+ (BOOL)requestIsCacheEquivalent:(NSURLRequest *)a toRequest:(NSURLRequest *)b;

Parameters

aRequest

The request to compare with bRequest.

bRequest

The request to compare with aRequest.

Return Value

YES if aRequest and bRequest are equivalent for cache purposes, NO otherwise.

Discussion

Requests are considered equivalent for cache purposes if and only if they would be handled by the same protocol and that protocol declares them equivalent after performing implementation-specific checks.

The NSURLProtocol implementation of this method compares the URLs of the requests to determine if the requests should be considered equivalent. Subclasses can override this method to provide protocol-specific comparisons.