edit-icon download-icon

Considerations regarding cache policy setting

Last Updated: Dec 15, 2017
  • For infrequently updated static files (e.g. image files or application download files), we suggest you set a cache time of 1 month or more.

  • For static files that must be updated or are updated frequently (e.g. js and css files), you can set a shorter cache time based on the actual situation.

  • For dynamic files (e.g. php, jsp, and asp files), the second approach is preferable.

    • Be sure to set Cache-Control to no-cache, private, or max-age=0. (Dynamic files are generally logon pages with cookie IDs, transaction pages, or pages that must be generated through interaction with databases). Alibaba Cloud CDN will not cache these files, but directly go back to the origin site to get them;

    • If most of the files under a Alibaba Cloud CDN domain name are dynamic files, we strongly suggest you use an independent domain name, rather than Alibaba Cloud CDN acceleration.

Note: After the cache configuration rules are changed, the new rules will not take effect immediately, but will automatically take effect upon the expiration of the original cache configuration. Perform a manual refresh if you need the new rules to take effect immediately. Before directory refresh, check how many resources are carried back to the origin site, to avoid pressure on the origin site.

Thank you! We've received your feedback.