跳转到主要内容

Purge cache

import { DirectoryListing } from "~/components"; export const limitsDetails = "If your account includes zones with different Cloudflare plans, the above limits are shared between all the zones with the same plan. For example, all the zones in your account with a Pro plan will share the limits for the Pro plan, and all the zones in your account with a Business plan will share the limits for the Business plan.";

Cloudflare's Instant Purge ensures that updates to your content are reflected immediately. Multiple options are available for purging content, with single-file cache purging (purge by URL) being the recommended method. However, the following additional options are also available:

To purge cached content using the Cloudflare API, refer to Purge Cached Content.

To mark content as stale instead of removing it, invalidate cached content. Cloudflare revalidates invalidated content on the next request and reuses content that has not changed.

:::note A successful purge request returns HTTP 200. This indicates that Cloudflare received the request — it does not confirm that Cloudflare cached the targeted content or evicted any content. To verify a purge, request the asset after purging and confirm that CF-Cache-Status is no longer HIT. :::

:::note If versioning is active on your zone and multiple environments are configured, you can select the specific environment you want to purge. For more details, refer to the Version Management documentation. :::

Availability and limits

Free Pro Business Enterprise
Availability Yes Yes Yes Yes
Purge options URL, Hostname, Tag, Prefix, and Purge Everything URL, Hostname, Tag, Prefix, and Purge Everything URL, Hostname, Tag, Prefix, and Purge Everything URL, Hostname, Tag, Prefix, and Purge Everything

Invalidation requests count toward the same limits as purge requests. For details, refer to Invalidation limits.

Hostname, tag, prefix URL, and purge everything limits

The following limits apply per account to purge and invalidation requests:

Free Pro Business Enterprise
Requests 5 requests per minute 5 requests per second 10 requests per second 50 requests per second
Bucket size 25 25 50 500
Max operations per request 100 100 100 100

{limitsDetails}

Single-file purge limits

The following limits apply per account to purge and invalidation requests:

Free Pro Business Enterprise
URLs 800 URLs per second 1500 URLs per second 1500 URLs per second 3000 URLs per second
Max operations per request 100 100 100 500

{limitsDetails}

Note that the thresholds for URLs are calculated using a moving average.

Token bucket rate limiting

Cloudflare uses token bucket rate limiting to limit the number of purge requests flowing through the system at any given time, ensuring a steady and manageable flow.

Each account tier has a defined request rate (for example, Free: 5 requests per minute, Business: 10 requests per second), and requests are only allowed if there are available tokens in the bucket. Tokens refill at a consistent rate, but each bucket has a maximum capacity (for example, Free: 25 tokens, Enterprise: 500 tokens), allowing short bursts of requests if tokens have accumulated.

If the bucket is empty, further requests must wait until new tokens are added. This system maintains fair usage while allowing occasional bursts within the bucket's capacity.

If you are an Enterprise customer and you need more operations, reach out to your account team for support.