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

python - Writing Greek in matplotlib labels, titles -

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

Pygame memory leak with transform.flip -