Dynamic Route for CDN (DCDN) allows you to refresh and prefetch resources from origins. The refresh feature allows you to force DCDN nodes to communicate with origins and obtain the latest files. The prefetch feature allows you to load frequently accessed resources to DCDN nodes before peak hours to improve resource access efficiency. This topic describes how to configure object refresh and prefetching and how to query refresh or prefetch records.

Background information

The concepts of refresh and prefetch in DCDN are as follows:
  • Refresh: After a URL refresh or directory refresh request is submitted, the corresponding resource cached on the DCDN nodes will forcibly expire. When a DCDN node receives a request for the resource, it directly retrieves the resource from the origin. The DCDN node then caches the resource and returns it to the requester. The refresh feature reduces the cache hit ratio.
  • Prefetch: After a URL prefetch request is submitted, the origin server automatically caches the corresponding resource to DCDN nodes. When a DCDN node receives a request for this resource for the first time, it directly returns the resource from the cache without retrieving the resource from the origin. The prefetch feature increases the cache hit ratio.
The following table describes the refresh and prefetch features.
Category How it works Limit Time to take effect
URL-based object refresh DCDN nodes are forced to retrieve the latest versions of the specified files from the origin.

Each URL must start with the string http:// or https://.

Each Alibaba Cloud account can refresh up to 2,000 URLs every day. You can refresh up to 1,000 URLs in one operation.

Within 5 minutes
Directory-based object refresh DCDN nodes are forced to retrieve the latest files in the specified directories from the origin.

Each URL must start with the string http:// or https://, and end with a forward slash (/).

Each Alibaba Cloud account can refresh up to 100 directories every day. You can refresh all these directories in one operation.

URL-based object prefetching DCDN fetches the specified resources from the origin before it receives any requests for these resources and caches them to L2 nodes. When these resources are requested, the L2 nodes return them directly from the cache.

Each URL must start with the string http:// or https://.

Each Alibaba Cloud account can prefetch up to 500 URLs every day. You can prefetch up to 100 URLs in one operation.

Note The time required to complete a refresh or prefetch task depends on multiple factors, including the file quantity, the file size, the bandwidth of the origin server, and network conditions.

Procedure

  1. Log on to the Dynamic Route for CDN console.
  2. In the left-side navigation pane, click Refresh and Push.
  3. On the Refresh Cache tab, configure the refresh or prefetch feature as needed.
    Refresh Cache
  4. Click Submit.
  5. Click the Records tab.
  6. On the Records tab, specify the time range and operation type, enter a domain name or URL, and then click Search.

    You can check the refresh and prefetch records, including the target object, operation type, operation time, status, and progress of each operation.