iOS cache policy

Source: Internet
Author: User

Nsurlrequestcachepolicy Cache Policy

1> nsurlrequestuseprotocolcachepolicy = 0, the default caching policy, if the cache does not exist, is obtained directly from the server. If the cache is present, the next action will be judged based on the Cache-control field in response, such as: Cache-control fields Must-revalidata, ask the server if the data is updated, and no updates are returned directly to the user to cache the data. If it has been updated, the service side is requested. 2> Nsurlrequestreloadignoringlocalcachedata = 1, ignoring local cache data, requesting the server directly. 3> Nsurlrequestignoringlocalandremotecachedata = 4, ignoring the local cache, proxy server, and other mediations, directly requesting the source service side. 4> Nsurlrequestreloadignoringcachedata = Nsurlrequestreloadignoringlocalcachedata 5> Nsurlrequestreturncachedataelseload = 2, the cache is used, regardless of its validity (that is, ignoring the Cache-control field), no request server. 6> nsurlrequestreturncachedatadontload = 3, anyway load local cache. Fail without it. (determines that no network is currently used) 7> Nsurlrequestreloadrevalidatingcachedata = 5, the cached data must be validated by the server to be used ( Seems to be a case in Nsurlrequestuseprotocolcachepolicy) Tips:url Loading System supports only the following 5 protocols: only/HTTP and https://are available for caching policies. (1)/HTTP (2) https://(3) ftp://(4) file://(5) data://

iOS cache policy

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.