You can prefetch popular resources during off-peak hours, or prefetch resources for accelerated domain names that are not frequently visited. When clients request these resources again, CDN nodes return these resources to the clients. This way, the cache hit ratio of Alibaba Cloud Content Delivery Network (CDN) is increased.
Prerequisites
Alibaba Cloud account registration and real-name verification are completed.
Background information
CDN nodes serve as node resources shared by all Alibaba Cloud CDN users. You can set a time-to-live (TTL) value for each resource that is cached on a CDN node. This allows you to specify the validity period of resources that are cached on the CDN node. If your accelerated domain name is not frequently visited, the resources of the accelerated domain name may be removed from the CDN node before they expire. The least popular cached resources are the first to be stale in the cache. Popularity is indicated by how frequently a file is accessed on the node. If the file has low popularity, it may be removed before it expires.
- The prefetch feature can be used to upload the specified URLs to L2 nodes in advance. When clients access an associated website again, the L2 nodes return the requested content to the clients without the need to retrieve the content from origin server. The prefetch feature does not increase the L1 hit ratio, but improves the overall hit ratio of Alibaba Cloud CDN.
- The refresh feature can be used to clear the cache history of specific URLs or directories. This operation is often performed when the cached content on CDN nodes is stale after origin servers update the content with the same name. If a URL is refreshed, a request to the URL is redirected to the origin server during the visit that follows the refresh operation. Use the refresh feature with caution because this feature reduces the cache hit ratio.