A sports site on Cloudflare enabled Cache Reserve to cut origin egress, yet after each nightly purge by tag its origin egress and Class A operations jump; why?
answer
- the persistent tier behind the edge
- a September 2026 behaviour change
- every purge type forces a miss
- rewrites are Class A operations
- invalidate when content may be unchanged
basics
~20 sSince September 2026 every purge type forces a Cache Reserve miss: each purged object is refetched from the origin in full and rewritten, a Class A operation. For probably unchanged content, invalidate instead, so a 304 reuses the stored copy.
solid answer
~50 s**Cache Reserve** is a persistent cache on R2 that acts as the last upper tier, so long-tail objects survive edge evictions. Since **2026-09-28**, a purge by tag, hostname, prefix or everything **forces a Cache Reserve miss**; before, those types only marked the stored copy for revalidation. So the nightly tag purge makes every tagged object a miss: the origin sends it **in full** even if it has not changed, and Cloudflare writes it back to Cache Reserve, a **Class A** operation. Only a URL purge deletes from Cache Reserve; the other types leave the old copy stored and billed until it is replaced or its retention period, 30 days to start with, runs out. If most of those objects have not changed, send the same body to `invalidate_cache`: with an `ETag` or `Last-Modified` from the origin, a `304` lets Cloudflare reuse the stored copy, though updating it is still a Class A operation.
go deeper
Recall that Cache Reserve is a persistent cache on R2 behind the edge, and that a purge also forces a refetch for content stored there.
Explain admission (cacheable, a TTL of at least 10 hours, Content-Length), the 30-day retention, and how misses and hits map to Class A and Class B operations.
Diagnose the post-purge spike from the September 2026 change, and move unchanged refreshes to invalidate_cache with validators at the origin.
Weigh Cache Reserve's storage and operations bill against origin egress, and set which jobs may purge rather than invalidate long-tail content.
## What Cache Reserve is The edge cache in each data center is large but not permanent: objects that are rarely requested get **evicted** to make room. For a sports site, the season archives, old match reports and player photos are exactly that long tail, and every eviction means another fetch from the origin, and another bill for origin **egress** if the origin sits with a cloud provider. **Cache Reserve** is a large, persistent store built on **R2**. It acts as the **ultimate upper tier**: when the edge misses, Cloudflare checks Cache Reserve before going to the origin, and whatever it fetches from the origin it writes there as well as into the edge caches. An object is admitted only if it: - is **cacheable** under Cloudflare's normal rules; - has a **freshness TTL of at least 10 hours**, set by `Cache-Control`, `CDN-Cache-Control`, Edge Cache TTL, Cache TTL by status code or a Cache Rule; - has a **`Content-Length`** response header; - is not a **resized variant** from image transformations (originals are eligible). An object stays for its **retention period**, 30 days to start with, and every request resets that timer. Freshness still follows the Edge Cache TTL or the origin's headers, exactly as in the edge cache. Cache Reserve is designed to run with **Tiered Cache** on, and the dashboard warns if you enable it without. ## How it bills | Item | Rate | | --- | --- | | Storage | $0.015 per GB-month | | Class A operations (writes) | $4.50 per million | | Class B operations (reads) | $0.36 per million | A Cache Reserve **miss** usually costs one Class A and one Class B operation; a **hit** costs one Class B. Purge requests themselves are free operations. Billable quantities round up to the nearest million. ## What changed on 2026-09-28 Purge now treats Cache Reserve the way it treats the edge cache: - **Every purge type forces a Cache Reserve miss.** Before the change, purge by tag, hostname, prefix or everything only marked matching Cache Reserve content for revalidation, so unchanged objects could come back cheaply with a `304`. Now the next request for each purged object goes to the origin, which sends the **full** response, and Cloudflare writes it again: one more **Class A** operation per object. - **Only purge by URL deletes the stored copy.** Tag, hostname, prefix and everything purges leave it in storage, still billed, until a later request replaces it or its retention period ends. That is the nightly jump: thousands of tagged archive pages, most unchanged, are refetched in full and rewritten every night. ## Invalidation instead of purge The same release added **invalidation**, sometimes called soft purge, through the `invalidate_cache` endpoint or **Invalidate Cache** on the **Caching > Configuration** page. It takes the same selectors and request body as a purge: 1. Make sure the origin returns an `ETag` or `Last-Modified` header and answers conditional requests. 2. Send the nightly job's body, for example `{"tags": ["season-2025"]}`, to `POST /zones/{zone_id}/invalidate_cache` instead of `purge_cache`. 3. On the next request Cloudflare sends a conditional request. A `304 Not Modified` lets it **reuse the stored copy**; new content replaces it. Invalidation cuts **origin egress**, not Cache Reserve operations: updating the stored copy after a `304` is still a Class A operation, and invalidating by URL updates the stored content when you send the request, also Class A. Content served from Cache Reserve is not served stale while it revalidates. Invalidation also draws on the same account-level limits as purge. ## Choosing per job - **A wrong score that must never be served again**: purge, after the origin has the fix. Invalidated content can still be served stale while revalidating, or when the origin errors. - **A nightly refresh of mostly unchanged archives**: invalidate, or narrow the tags so only the matches that changed are touched. - **Archives with no validators**: invalidation falls back to full fetches, so add `ETag` or `Last-Modified` at the origin first. ## Confirming the diagnosis - **Cache Reserve Analytics** shows Class A and Class B operations over time, egress savings and requests served from Cache Reserve; a Class A spike right after the purge job is the signature. - The `CacheReserveUsed` field in the HTTP requests logs shows which sampled requests filled from, or were served by, Cache Reserve. - Check what the job actually purges: a tag shared by the whole archive behaves like a purge everything for Cache Reserve.
- Why might long-tail objects never reach Cache Reserve at all?Admission needs a cacheable response with a freshness TTL of at least 10 hours and a `Content-Length` header. A short `max-age`, a chunked response without `Content-Length`, or a resized image variant from image transformations keeps an object out, so those objects keep coming from the origin after every edge eviction.
- How do you empty Cache Reserve completely, and what must happen first?Turn Cache Reserve off first, because clearing requires it to be off, then use **Delete Storage** in the dashboard or the `cache_reserve_clear` API endpoint. Deletion can take up to 24 hours. Pausing alone stops Cloudflare using Cache Reserve but keeps the data stored, and billed, until it is purged or expires.
- A purge by tag deletes the matching objects from Cache Reserve storage at once.
- Purge by tag still revalidates Cache Reserve content against the origin.
- Invalidation avoids Class A operations entirely.
- Any cacheable object is written to Cache Reserve, whatever its TTL.
- Cache Reserve works best with Tiered Cache turned off.
Assumes the 2026-09-28 change: purge by tag, hostname, prefix or everything now forces a Cache Reserve miss instead of marking content for revalidation, and the invalidate_cache endpoint arrived the same day.