SDMCacheDelegate protocol

Deprecated. Defines default DownloadCache delegate methods Protocol to be adapted by client classes in order to achieve the DownloadCache functionality

Syntax

@protocol SDMCacheDelegate

Derived classes

Members

All members of SDMCacheDelegate, including inherited members.

Methods
Method Description
- (NSDictionary *) cachedHeadersForRequest: (id< SDMRequesting >) request Should return an NSDictionary of cached headers for the passed request, if it is stored in the cache.
- (NSData *) cachedResponseDataForRequest: (id< SDMRequesting >) request Should return the cached body of a response for the passed request, if it is stored in the cache.
- (void) clearCachedResponsesForStoragePolicy: (CacheStoragePolicy) cachePolicy Clear cached data stored for the passed storage policy.
- (CachePolicy) defaultCachePolicy Should return the cache policy that will be used when requests have their cache policy set to DefaultCachePolicy.
- (BOOL) isCachedDataCurrentForRequest: (id< SDMRequesting >) request Should return YES if the cache considers its cached response current for the request Should return NO if the data is not cached, or (for example) if the cached headers state the request should have expired.
- (NSString *) pathToCachedResponseDataForRequest: (id< SDMRequesting >) request Same as the above, but returns a path to the cached response body instead.
- (void) removeCachedDataForRequest: (id< SDMRequesting >) request Should Remove cached data for a particular request.
- (void) storeResponseForRequest: (id< SDMRequesting >) request maxAge: (NSTimeInterval) maxAge Should store the response for the passed request in the cache When a non-zero maxAge is passed, it should be used as the expiry time for the cached response.