When a shop moves caching Page Rules to Cloudflare Cache Rules, how do stacking, last-match-wins and Eligible for cache's Cache Everything change the result?
answer
- first match versus every match
- later rules override earlier ones
- precedence over Page Rules and zone settings
- Eligible for cache means Cache Everything
- two base rules keep standard caching
basics
~20 sPage Rules apply only the highest-priority match; Cache Rules all apply in order and the last match wins shared settings. Eligible for cache also turns on Cache Everything, so standard caching needs a Bypass-all rule followed by an eligible rule for default extensions.
solid answer
~50 sPage Rules, now deprecated, apply **only the highest-priority matching rule**, so teams put the most specific rule first. **Cache Rules stack**: every matching rule applies in list order, and when two set the same or a conflicting setting, such as Bypass cache against Eligible for cache, the **last matching rule wins**, so specific overrides belong **later**. Cache Rules take precedence over a Page Rule caching the same path and over zone-wide cache settings for the requests they match. Choosing **Eligible for cache** turns on what Page Rules called Cache Everything, so HTML becomes cacheable. To keep standard behaviour, create first a rule matching all incoming requests with Bypass cache, then one matching the default cacheable extensions with Eligible for cache, before adding the rest. Some settings that were Business or Enterprise as Page Rules, such as Bypass Cache on Cookie, work on every plan in Cache Rules.
go deeper
Recall that Cache Rules replace caching Page Rules and that, unlike Page Rules, more than one Cache Rule can apply to a request.
Explain stacking and last-match-wins with a concrete pair of rules, and why Eligible for cache means Cache Everything.
Show a migration plan that adds the two base rules, orders exceptions last, verifies with Trace, and catches TTL-only Page Rules that would start caching HTML.
Decide how far to keep Page Rules' behaviour versus redesigning the rule set, and who signs off when a migrated rule widens what is cached.
## Two evaluation models **Page Rules** are deprecated. They form an ordered list in which **only the highest-priority matching Page Rule takes effect**; the advice was always to order them from most specific to least specific. **Cache Rules** work differently: - They are **stackable**: every rule whose expression matches is applied, in list order. - When several matching rules set a value for the **same setting**, the value in the **last matching rule** wins. - **Conflicting settings** follow the same rule. If rule 1 makes `example.com/images` Eligible for cache and rule 2, later, bypasses cache for all of `example.com`, image requests are bypassed, because rule 2 matched last. The practical consequence for a migration is that the habit flips: broad rules go **first** and specific exceptions go **later**. | | Page Rules | Cache Rules | |---|---|---| | Rules applied per request | Only the highest-priority match | Every matching rule, in order | | Same setting set twice | Not applicable, one rule applies | Last matching rule wins | | Where the specific rule goes | Top of the list | After the broad rule | | Rules per zone (Free, Pro, Business, Enterprise) | 3, 20, 50, 125 | 10, 25, 50, 300 | | Status | Deprecated | Current | ## Precedence over other settings - If a Page Rule and a Cache Rule both set caching for the same path, **the Cache Rule takes precedence** by design. - Cache Rules override **zone-wide** cache settings on the requests they match. A zone Browser Cache TTL of 4 hours and a Cache Rule for `/feed` with a 10-second Browser TTL give `/feed` 10 seconds. - Among Rules products, Single Redirects, URL Rewrite Rules, Configuration Rules, Origin Rules, Bulk Redirects, Managed Transforms and Request Header Transform Rules run before Cache Rules, and Snippets after; all of these take precedence over Page Rules. A request answered by a redirect never reaches the cache. ## The Cache Everything change With Page Rules you had to choose **Cache Level: Cache Everything** explicitly. With Cache Rules, selecting **Eligible for cache** turns Cache Everything on by default, so any rule you mark eligible makes HTML and other non-default extensions cacheable for its matches. In the dashboard, the TTL and Cache Key settings appear only after Eligible for cache is selected, so a rule written just to adjust a lifetime makes its matches eligible as well. To keep the old standard behaviour, Cloudflare's migration guide prescribes two rules, in this order, before any others: 1. **bypass everything**: When incoming requests match **All incoming requests**, Cache eligibility **Bypass cache**. 2. **cache all default cacheable extensions**: `http.request.uri.path.extension in {...}` listing the default extensions (`css`, `js`, `jpg`, `png`, `woff2`, `pdf` and the rest), Cache eligibility **Eligible for cache**. Later rules then turn Cache Everything on only for what they match, so each one needs a tightly scoped expression. ## Mapping the shop's Page Rule settings | Page Rule setting | Cache Rule equivalent | |---|---| | Cache Level: Cache Everything | Eligible for cache | | Cache Level: Bypass | Bypass cache | | Edge Cache TTL | Edge TTL: Ignore cache-control header and use this TTL | | Browser Cache TTL | Browser TTL: Override origin | | Bypass Cache on Cookie (Business and Enterprise) | An `http.cookie` condition with Bypass cache, on every plan | | Cache on Cookie (Business and above) | An `http.cookie` condition with Eligible for cache | | Cache By Device Type (Enterprise) | Cache Key: Cache by device type, on every plan | | Cache Deception Armor | Cache Key: Cache deception armor | | Custom Cache Key (Enterprise) | Cache Key custom parts, still Enterprise | ## A migration checklist 1. List every Page Rule that touches caching and what it sets. 2. Create the two base rules if the zone relied on standard caching. 3. Translate each Page Rule, placing specific rules **after** broad ones. 4. Check sample URLs with Cloudflare Trace, which shows the Cache Rules that match a request. 5. Delete each Page Rule once its Cache Rule is verified, so two systems never describe the same path. Watch especially for a Page Rule that set only a TTL: its Cache Rule twin, marked Eligible for cache, starts caching HTML on paths that were never cached before.
- Why does a migrated Cache Rule meant only to lengthen /blog/* Browser TTL start caching blog HTML?In the dashboard the Browser TTL setting is offered only after Eligible for cache is chosen, and Eligible for cache turns on Cache Everything for every request the rule matches. The old Page Rule changed the lifetime without changing the cache level. Scope the new rule to the files that should be cached, or keep HTML out with a later Bypass cache rule.
- Where do Cache Rules sit relative to redirects and URL rewrites on Cloudflare?Single Redirects, URL Rewrite Rules, Configuration Rules, Origin Rules, Bulk Redirects, Managed Transforms and Request Header Transform Rules run before Cache Rules, and Snippets run after. A request a redirect answers at the edge never reaches the cache, and all of these Rules products take precedence over Page Rules.
Page Rules are a menu where you get only the first line that fits your order. Cache Rules are transparent sheets stacked on an overhead projector: every sheet that matches is laid down in order, and where two sheets draw on the same spot, the one laid down last is what shows.
- Cache Rules stop at the first matching rule, just like Page Rules.
- The most specific Cache Rule belongs at the top of the list so it wins.
- Eligible for cache keeps standard caching unless Cache Everything is ticked separately.
- A Page Rule on the same path overrides a Cache Rule because Page Rules are older.
- Bypassing cache on a cookie still needs a Business plan after moving to Cache Rules.
Assumes Cloudflare as of 2026-10-10: Page Rules are deprecated, Cache Rules are the supported way to set caching per request, and Eligible for cache turns on what Page Rules called Cache Everything.