I had considered writing a custom url cache, but it seems that NSURLCache is supposed to support a disk cache. I’d like to have my iphone app use cached responses without hitting the server at all until the resource becomes stale (as determined by the headers I send back from the server).
Do I have to call something fancy with NSURLConnection? How can I get the iphone to use the cached version of the url?
Update: Here is a link to my code
The answer is, unfortunately, that the iPhone can’t do disk caching with NSURLCache, making it inappropriate for the scenario I outlined.
I’m rolling my own class.