All Products
Search
Document Center

ApsaraVideo VOD:Refresh and prefetch

Last Updated:Jun 13, 2024

You can use the refresh 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 refresh and prefetch features.

Features

  • Purge: marks resources that are cached on all POPs as expired. When a POP receives a request, the POP redirects the request to the origin server to retrieve the requested resource. Then, the resource is returned to the client and cached on the POP. The purge feature reduces the cache hit ratio.

  • Prefetch: prefetches resources from the origin server and caches the resources on POPs. When a POP receives a request, the POP directly returns the requested resource to the client because the resource is already cached on the POP. The prefetch feature increases the cache hit ratio.

Scenarios

Feature

Scenario

Refresh

  • Update and release resources

    After resources on your origin server are updated, you can submit the URLs or the directories of the updated resources. Then, Alibaba Cloud CDN refreshes the resources that are cached on POPs. This ensures that visitors can retrieve up-to-date resources from POPs.

  • Remove illicit content

    After you remove illicit content from your origin server, visitors can still access the resources because the resources are cached on POPs. In this case, you need to use the refresh feature to update the cache and remove the resources from POPs.

Prefetch

  • Provide support for major events

    If you want to hold a major activity, you can prefetch the static resources of the event page to POPs. When the activity starts, visitors can access the static resources that are already cached on POPs. This accelerates content delivery.

  • Release installation packages

    Before you release an installation or upgrade package of a product, you can prefetch the package to POPs. After the product is launched, visitors can download the package from POPs. This accelerates content delivery and reduces loads on the origin server when a large number of visitors want to access your resources.

Procedure

  1. Log on to the ApsaraVideo VOD console.

  2. In the left-side navigation pane, choose Configuration Management > CDN Configuration> Refresh and Prefetch.

  3. On the Refresh Cache tab, configure the refresh or prefetch operation based on your business requirements.

    003

    The following table describes the parameters.

    Parameter

    Description

    Operation

    Supported operations:

    • Refresh

      After resources are updated on the origin server, the URLs of the resources are refreshed. Then, the system clears the resources that are cached on POPs. When you access the refreshed 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 refresh or prefetch. Supported options:

    • Folder

      This option is available only when you set Operation to Refresh.

    • URL

      This option is available when you set Operation to Refresh or Prefetch.

    URL

    If you need to refresh 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.

    • Refresh resources based on directories

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

      You can refresh up to 100 directories within each Alibaba Cloud account per day. You can submit up to 100 directories at a time.

    • Refresh resources based on URLs

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

      You can refresh up to 2,000 URLs within each Alibaba Cloud account per day. You can submit up to 1,000 URLs at a time.

    • Prefetch resources based on URLs

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

      You can prefetch up to 500 URLs within each Alibaba Cloud account per day. You can submit up to 100 URLs at a time.

  4. Click Submit.

  5. Click the Records tab.

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

Related API operations

FAQ