All Products
Search
Document Center

CDN:Purge and prefetch FAQ

Last Updated:Oct 22, 2026

This topic answers frequently asked questions about Alibaba Cloud CDN purge and prefetch, including resource releases, configuration changes, execution method selection, and prefetch investment.

Resource releases and configuration changes

Choose purge or prefetch based on whether the resource URL changes, whether edge nodes hold outdated cached content, and whether you need to reduce origin fetch pressure on first access.

Does every resource release require purge before prefetch?

No. Choose the operation based on the resource URL and your access requirements:

  • Publishing a new URL: Purge is not required when the new URL maps to a new cache key and the edge nodes do not contain outdated cached content. If ignored parameters, a custom cache key, or URL rewriting still maps the new URL to existing outdated cached content, follow the same-name update guidance to decide whether to purge. Prefetch the key resources only when you expect concentrated access after the release and the origin capacity is limited.

  • Updating content under the same name: Purge the outdated cached content when the edge nodes still hold cached content that has not expired and you must update the content before it expires naturally. Purge is not required when no outdated cached content exists or when you can wait for the cache to expire naturally. Prefer filenames that contain content hashes. You can also use version parameters, provided that the parameters are included in the cache key. After the purge task is complete, prefetch only when you need to reduce origin fetch pressure before the first access.

  • Using Alibaba Cloud CDN for the first time: Purge is not required. You can prefetch the popular resources. For the remaining resources, the cache fills naturally on the first access.

For detailed purge and prefetch procedures and task verification methods, see Purge and prefetch resources.

Do I need to purge or prefetch after I modify Alibaba Cloud CDN configurations?

No. Purge does not accelerate the configuration rollout, and prefetch does not clear browser caches. First, determine whether the configuration changes the content or the response headers of the cached objects:

  • Configurations that affect only how subsequent requests are processed: Wait for the configuration rollout to complete, and then verify the result. Do not purge to accelerate the rollout.

  • Configurations that require replacing outdated content or outdated response headers on the edge nodes: After the configuration takes effect, purge the specific affected URLs or directories so that subsequent requests regenerate the cache according to the new configuration.

  • Configurations that require reducing the origin fetch pressure while the cache is repopulated: After the purge is complete, prefetch the popular resources. Otherwise, prefetch is not required.

If the response content or the response headers still do not meet expectations, check the origin response, the rollout status of the Alibaba Cloud CDN configuration, and the browser cache separately. Identify the cause instead of submitting purge tasks repeatedly.

Execution methods and prefetch cost

The execution method depends on task frequency, URL volume, automation requirements, and result observability. When you determine the prefetch scope, also evaluate the origin capacity and the origin fetch cost.

How do I choose among the console, the API, batch scripts, and OSS automatic purge?

  • Console: Suitable for occasional, small-volume tasks that require manual confirmation.

  • API or software development kit (SDK): Suitable for integrating with release pipelines, submitting tasks based on business rules, and querying results. To prefetch with custom request headers, use the WithHeader parameter of the PushObjectCache API.

  • Batch scripts: Suitable when you already have a URL list and need to submit tasks in batches. Before you use batch scripts, check the quotas, the supported task types, and the failure retry strategy. For examples, see Use a script to purge and prefetch content.

  • OSS automatic purge: Suitable for automatically invalidating the Alibaba Cloud CDN cache after OSS objects change. The OSS bucket and Alibaba Cloud CDN must belong to the same Alibaba Cloud account. Automatic purge does not guarantee that a task succeeds or completes promptly. If you need to know the execution result, submit a task and query its status. For configuration instructions, see Availability: Use prefetch and auto-refresh.

How do I determine the prefetch scope and control the origin fetch cost?

Prefetch only the resources that are expected to receive concentrated access within a short period and whose first origin fetch might place significant pressure on the origin. Filter the URLs by popularity, release time, file size, acceleration region, origin bandwidth, and budget. Submit tasks in batches and observe the origin load.

  • Installation packages, popular videos, and static campaign resources usually have a higher priority. Small files, less frequently accessed files, and files that will not be accessed immediately usually do not require prefetch.

  • Prefetch itself is free, but the active origin fetches generate traffic and requests that the origin product might charge for. The actual usage varies with the edge node distribution, the file size, the task scope, and the origin type, so do not estimate it from a fixed number of edge nodes.

  • Prefetch does not support directories. You can submit only specific file URLs. For quotas and task limits, see Limitations.