ios - curious about NSURLCache -


the cache, such as NSURLRequestUseProtocolCachePolicy , NSURLRequestReturnCacheDataElseLoad , however, or one of them after reading them you are using the local cache data, or use the cash, my question , So that I want to start requesting a URL, before I want to load the cache and render ui, then negotiate with the server new Grab the final data and ui, which policy Continue to my liking refreshing?

If I want to achieve the right understanding of what you quickly cache show (UI data obtained even if it is outdated, so existing data even get it slow), then you have two requests using different cache policies I request another start, only when the first one finished First, check the result of first request, because first Ta may not be available in the cache, so the first request will be first come back to the uncached data that you wanted.

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -