UIWebView NSURLRequestReloadIgnoringLocalCacheData doesn't actually ignore the cache

Posted by dodeskjeggen on Stack Overflow See other posts from Stack Overflow or by dodeskjeggen
Published on 2010-03-31T19:49:02Z Indexed on 2010/03/31 19:53 UTC
Read the original article Hit count: 624

Filed under:
|
|
|

I have a UIWebView object, with the caching-policy specified as: NSURLRequestReloadIgnoringLocalCacheData

This should ignore whatever objects are in the local cache and retrieve the latest version of a site from the web.

However, after the first load of the site (10 resources in trace, HTTP GET), all subsequent loads of the site only retrieve a small subset of resources (3 resources in trace, HTTP GET). The images all appear to be loaded from some local source.

I have confirmed that my sharedURLCache has a memory usage of 0 bytes, and a disk usage of 0 bytes. Whenever the process starts fresh, the full version of the site is retrieved again. This leads me to believe that these resources are being stored in an in-memory cache, but as I noted before, [[NSURLCache sharedURLCache] currentMemoryUsage] returns 0.

I have also tried explicitly removing the cached response for my request, but this seems to have no effect. What gives?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about cache