Dynamic Route for CDN (DCDN) allows you to refresh and prefetch resources from origins. The refresh feature allows you to force DCDN nodes to retrieve the latest files from the origins. The prefetch feature allows you to load frequently accessed resources to DCDN nodes before peak hours to improve the efficiency of resource accesses. This topic describes how to configure the refresh and prefetch features and how to view refresh and prefetch records.

Background information

The following section describes the concepts of refresh and prefetch in DCDN:
  • Refresh: After a URL refresh or directory refresh request is submitted, the corresponding resource that is cached on the DCDN nodes forcibly expires. When a DCDN node receives a request for the resource, the node retrieves the resource from the origin. Then, the DCDN node 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 the resource for the first time, the node returns the resource from the cache. This eliminates the need to retrieve 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 origins.

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

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

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

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

You can use each Alibaba Cloud account to refresh up to 100 directories every day. You can refresh all the 100 directories in each operation.

URL-based object prefetch DCDN fetches the specified resources from the origin before DCDN receives requests for these resources and caches them to Layer 2 (L2) nodes. When these resources are requested for the first time, the L2 nodes return them from the cache.

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

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

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

Procedure

  1. Log on to the DCDN console.
  2. In the left-side navigation pane, click Refresh and Prefetch.
  3. On the Refresh Cache tab, configure the refresh or prefetch feature based on your business needs.
    Note If you need to submit URLs by using a file when you configure the refresh or prefetch feature, the file must be in the TXT format.
    Refresh and prefetch
  4. Click Submit.
  5. Click the Records tab.
  6. On the Records tab, specify a time range and an operation type, enter a domain name or a URL, and then click Search.

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