I have a UIWebView object with a caching policy specified as: NSURLRequestReloadIgnoringLocalCacheData p>
This should ignore all objects in the local cache and retrieve the latest version of the site from the Internet.
However, after the first site load (ten resources in a trace, HTTP GET), all subsequent site downloads receive only a small amount of resources (three resources in a trace, HTTP GET). All images are downloaded from some local source.
I confirmed that my sharedURLCache has 0 bytes memory usage and 0 bytes disk usage. Whenever the process starts to work, the full version of the site is retrieved again. This makes me think that these resources are cached in memory, but, as I noted earlier, [[NSURLCache sharedURLCache] currentMemoryUsage] returns 0.
I also tried to explicitly remove the cached response for my request, but this does not seem to have any effect. What gives?
Edit: In addition, NSHTTPCookieStorage is cleared before each download, and I can confirm that subsequent loads retrieve four resources instead of three. The caching issue persists regardless of the change.
source
share