FAQs about Cache Purge

Last updated: 2019-08-12 19:06:30

PDF

1. What is cache purge?

Cache purge includes URL purge, directory purge, and URL prefetch. (For more information, see Cache Purge.)

  • URL purge means to purge the cache on a file-by-file basis..
  • Directory purge means to purge all the files under a directory on a file-by-file basis.
  • URL prefetch means to prefetch resources on a file-by-file basis.

Purge vs. prefetch:

  • After purge, the resource cached on the CDN nodes across the network are deleted. When a user's request reaches a node, the node will pull the requested resource from the origin server and then cache it while returning it to the user. In this way, it can be guaranteed that the user can get the up-to-date resources.
  • After prefetch, the resource is cached on the CDN nodes across the entire network in advance. When a user's request reaches a node, the user can directly get the resource from the node.

2. What are the requirements for cache purge? How long does it take effect?

Cache purge includes URL purge, directory purge, and URL prefetch.
URL purge: A maximum of 10,000 URLs are allowed to be purged each day and a maximum of 1,000 URLs are allowed to be submitted for each purge. It takes about 5 minutes for the purge to take effect. If the cache validity period set for the file is less than 5 minutes, it is recommended to wait for the timeout and update, instead of using the purge tool.
Directory purge: A maximum of 100 directories are allowed to be purged each day and a maximum of 20 URL directories are allowed to be submitted for each purge. It takes about 5 minutes for the purge to take effect. If the cache validity period set for the folder is less than 5 minutes, it is recommended to wait for the timeout and update, instead of using the purge tool.
URL prefetch: This feature is only available for key CDN customers. If the resource has been cached on the node and has not expired, it will not be updated to the latest one. If you need to update the resources on all CDN nodes to the latest ones, you can purge them before prefetch. A maximum of 1,000 URLs are allowed to be prefetched each day and a maximum of 20 URLs are allowed to be submitted for each prefetch. It takes about 5 to 30 minutes for the prefetch to take effect, depending on the file size.

3. Will the cached content on CDN cache nodes be updated in real time?

No. The cached content on CDN cache nodes are updated based on the cache expiration configuration you set in the console. If you need to update a file's cache in real time, do it by purging cache.

4. Is directory purge supported by CDN?

Yes. CDN supports URL purge, directory purge, and URL prefetch.
Method 1: Purge the directory in the CDN Console. For more information, see Cache Purge.
Method 2:Purge the URL by calling the API. For more information, see URL Purge.

5. How to view the cache purge record?

You can check the cache purge history in the CDN Console. For more information, see History.

6. Why doesn't directory prefetch or purge take effect?

Please check whether Last-Modified of the origin server changes; if so, the origin-pull will fail. If you are unable to solve the problem, please submit a ticket for assistance.