Closed dqueffeulouatw closed 10 years ago
Don't use AFURLCache anymore:
Instead, register AFHTTPURLProtocol for http requests, so they'll be routed through AFCache:
[NSURLProtocol registerClass:[AFHTTPURLProtocol class]]; NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.apple.com/"]]; [self.webView loadRequest:request];
It seems like sometimes the cache-control: max-age in the response is not read. Actually, I found maybe an explanation for that in the AFURLCache :
the handleResponse: is not called (I added myself), so all the stuff made on headers is not done, only those passed as parameters. Is it safe to call handleResponse: here ?