Dynamic Route for CDN (DCDN) allows you to refresh and prefetch resources from origin servers. The refresh feature allows you to force DCDN nodes to retrieve the latest files from the origin servers. 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 requested 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 origin servers. 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 resource for the URL 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 server. 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 origin servers.

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

You can refresh up to 2,000 URLs with each Alibaba Cloud account per day. A maximum of 1,000 URLs can be submitted at a time.

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

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

You can refresh up to 100 directories with each Alibaba Cloud account per day. A maximum of 100 directories can be submitted at a time.

URL-based object prefetch DCDN fetches the specified resources from origin servers 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 prefetch up to 500 URLs with each Alibaba Cloud account per day. A maximum of 100 URLs can be submitted at a time.

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

Procedure

  1. Log on to the DCDN console.
  2. In the left-side navigation pane, choose Tools > Refresh and Prefetch.
  3. On the Refresh and Prefetch page, click the Refresh Cache tab and set the following parameters to refresh or prefetch resources based on your business requirements.
    Note If you want 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.