Skip to content

Instantly share code, notes, and snippets.

@asakin
Last active December 26, 2015 17:09
Show Gist options
  • Select an option

  • Save asakin/7185211 to your computer and use it in GitHub Desktop.

Select an option

Save asakin/7185211 to your computer and use it in GitHub Desktop.
@interface HRHResistantURLCache : NSURLCache
@end
@implementation HRHResistantURLCache
- (void)storeCachedResponse:(NSCachedURLResponse *)cachedResponse
forRequest:(NSURLRequest *)request
{
if (301 == [(NSHTTPURLResponse *)cachedResponse.response statusCode]) {
return;
}
[super storeCachedResponse:cachedResponse forRequest:request];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment