A couple of options here.
1) You can use ASIHTTPRequest and ignore cache headers to cache everything. When your application is in use, you can determine if the cache hits. If it hits, you delete the request to the server after the cache has hit to request any new data. You can do this by adding a random URL at the end of the URL, as cache keys are disconnected from the URL. If you have a good connection and new data, download it. Otherwise, do nothing, and your user has the latest data when using the application under a good connection.
2) Make the most of # 1, always clicking on the cache, but instead of launching a non-cached version of the same request to the server after getting into the cache, disable the check for lack of caching to check if the data is updated, If it were so, handle the full API request without caching. If this is not the case or failed, you can do nothing.
source share