You can use the purge feature to delete resources that are cached on points of presence (POPs) and retrieve the most recent resources from the origin server. This feature is applicable to resource updates and releases on the origin server, illicit resource removal, and domain name configuration modifications. You can use the prefetch feature to cache frequently requested resources to POPs during off-peak hours. This feature reduces loads on origin servers and improves user experience. This topic describes how to use the purge and prefetch features.
Feature description
Purge: Mark the corresponding cached resources on all CDN POPs as invalid. When you request again, CDN will retrieve the resources from the origin server and return them to you, while re-caching the resources to the CDN POPs. The purge feature reduces the cache hit ratio.
Prefetch: The origin server actively caches the corresponding resources to CDN POPs. When you request the resources for the first time, you can obtain the latest resources from the CDN POPs without retrieving them from the origin server. The prefetch feature increases the cache hit ratio.
Scenarios
Feature | Scenario |
Feature | Scenario |
Purge |
|
Prefetch |
|
Procedure
Log on to the ApsaraVideo VOD console.
In the left-side navigation pane, choose Configuration Management > CDN Configuration> Refresh and Prefetch.
On the Purge Cache tab, configure the purge or prefetch operation based on your business requirements.
The following table describes the parameters.
Parameter
Description
Parameter
Description
Operation
Supported operations:
Purge
After resources are updated on the origin server, the URLs of the resources are purged. Then, the system clears the resources that are cached on POPs. When you access the purged URLs, the latest resources from the origin server are retrieved. The retrieved resources are also cached on POPs.
Prefetch
You can prefetch frequently requested resources or less frequently visited resources during off-peak hours to improve the cache hit ratio.
Object
The type of the object that you want to purge or prefetch. Supported options:
List of methods
This option is available only when you set Operation to Purge.
URL
This option is available when you set Operation to Purge or Prefetch.
URL
If you need to purge or prefetch multiple URLs, enter one URL in each line. By default, the following limits apply to each Alibaba Cloud account. To increase the limits, contact your account manager or submit a ticket.
Purge resources based on directories
Each URL must start with
http://
orhttps://
, and end with a forward slash (/
).You can purge up to 100 directories within each Alibaba Cloud account per day. You can submit up to 100 directories at a time.
Purge resources based on URLs
Each URL must start with
http://
orhttps://
.You can purge up to 2,000 URLs within each Alibaba Cloud account per day. You can submit up to 1,000 URLs at a time.
URL prefetch
Each URL must start with
http://
orhttps://
.You can prefetch up to 500 URLs within each Alibaba Cloud account per day. You can submit up to 100 URLs at a time.
Click Submit.
Click the Records tab.
You can view the details of purge and prefetch records, including the object, type, time, status, and progress of each operation.