I have an NSURLMutableURLRequest
where I call
[urlRequest setCachePolicy:NSURLRequestReloadRevalidatingCacheData];
When I po [urlRequest cachePolicy]
it is always 1.
What is the getter doing that could force it to return 1?
I have an NSURLMutableURLRequest
where I call
[urlRequest setCachePolicy:NSURLRequestReloadRevalidatingCacheData];
When I po [urlRequest cachePolicy]
it is always 1.
What is the getter doing that could force it to return 1?
I suppose that this policy has not been implemented yet (navigate NSURLMutableURLRequest
by means of cmd+click and find NSURLRequestCachePolicy
).
enum
{
NSURLRequestUseProtocolCachePolicy = 0,
NSURLRequestReloadIgnoringLocalCacheData = 1,
NSURLRequestReloadIgnoringLocalAndRemoteCacheData = 4, // Unimplemented
NSURLRequestReloadIgnoringCacheData = NSURLRequestReloadIgnoringLocalCacheData,
NSURLRequestReturnCacheDataElseLoad = 2,
NSURLRequestReturnCacheDataDontLoad = 3,
NSURLRequestReloadRevalidatingCacheData = 5, // Unimplemented
};
typedef NSUInteger NSURLRequestCachePolicy;
This is also well documented in NSURLCache. There is also a radar at http://openradar.appspot.com/radar?id=1755401.