Edge CDN Caching, Tiered Cache, and Origin Path Routing
How global edge CDN caching works with tiered topology, cache rules, smart origin routing, security controls, and how to verify cache performance.
This page summarises Cloudflare Cache and related performance documentation: edge caching on a global anycast network, Tiered Cache, Argo Smart Routing for faster paths to the origin, and how those pieces fit together. General context on what a CDN does for site owners also appears in Google’s crawling and CDNs notes.
CDN edge cache: what it is and why sites use it
Section titled “CDN edge cache: what it is and why sites use it”A content delivery network sits between your origin server and visitors. Google describes CDNs as intermediaries that store copies of requested URLs so the origin does not have to serve every file again for a while, and that serve users from locations close to them.
Cloudflare states that a CDN’s core goal is to decrease latency and increase performance by caching content as close as possible to end users. Its CDN acts as a reverse proxy: requests pass through the edge network before reaching your origin, which also contributes to DDoS mitigation and more consistent performance across geographies.
For operators, the practical split is:
| Content type | Typical behavior | Why it matters |
|---|---|---|
| Static assets (images, CSS, JS) | Cached at the edge by default | Fewer origin round trips, lower egress and compute |
| Dynamic HTML, APIs, personalised pages | Not cached by default | Correctness over speed unless you explicitly design cache rules |
| Cache miss or non-cacheable request | Origin pull required | Latency depends on distance and network path |
Request flow: cache hit, tiered cache, and origin pull
Section titled “Request flow: cache hit, tiered cache, and origin pull”When a visitor requests content, Cloudflare first tries the cache; if that fails, it performs an origin pull to your web server.
The CDN reference architecture contrasts two situations:
- Without Tiered Cache or Argo Smart Routing: a local cache miss may go straight to the origin on a reliable but not necessarily fastest path.
- With Tiered Cache and Argo Smart Routing: a miss at the local data center can consult an upper-tier cache; if the object is still missing, traffic from the upper tier to the origin uses path selection based on real-time network conditions.
Argo Smart Routing is used when there is a cache miss and content must be fetched from the origin, or when the request is for non-cacheable dynamic content that must reach the origin.
Origin pull and time-to-first-byte (TTFB)
Section titled “Origin pull and time-to-first-byte (TTFB)”Argo Smart Routing analytics measure origin performance using time-to-first-byte (TTFB): the delay between Cloudflare sending a request to your server and receiving the first byte back. Argo Smart Routing is described as optimising transit time on that path. Detailed Origin Performance (Argo) histograms in the dashboard appear only if Argo routed at least 500 origin requests in the last 48 hours.
Default edge cache behavior and limits
Section titled “Default edge cache behavior and limits”What Cloudflare caches without extra rules
Section titled “What Cloudflare caches without extra rules”Default cache behavior states that Cloudflare caches by file extension, not by MIME type. HTML and JSON are not cached by default; robots.txt is cached by default. A long list of extensions (for example css, js, jpg, pdf, woff2) is cached when other conditions allow.
Get started with Cache adds that caching depends on caching level, file extension, query strings, origin Cache-Control, headers that mark dynamic content, and rules that bypass cache on cookies. Cloudflare caches only within the data center handling the request—not for DNS-only (unproxied) records or third-party URLs.
Success responses and edge TTL
Section titled “Success responses and edge TTL”For 2xx success responses, 200 responses are cacheable by proxies and browsers when cache controls allow. Without specific cache controls, static resources with a 200 may be cached at the edge for two hours by default.
Cache lock on simultaneous misses
Section titled “Cache lock on simultaneous misses”When many requests hit the same uncached asset at once, request collapsing uses a cache lock: only the first request goes to the origin; others wait and receive the same response, avoiding duplicate origin fetches for one asset from one location.
Caching levels and query strings
Section titled “Caching levels and query strings”Caching levels control how query strings affect static files:
| Level | Behavior |
|---|---|
| No Query String | Serve from cache only when the URL has no query string |
| Ignore Query String (default for static extensions) | Same cached object regardless of query string on static file URLs |
| Standard (default overall) | Different cache entries when the query string changes |
Ignore Query String applies only to static file extensions—for example style.css?a and style.css?b can share one cached object.
Tiered Cache, Cache Reserve, and Smart Shield
Section titled “Tiered Cache, Cache Reserve, and Smart Shield”Tiered Cache
Section titled “Tiered Cache”Cloudflare Cache describes Tiered Cache as caching frequently accessed content in multiple locations for faster delivery and reduced origin traffic. Cache content globally notes regional cache tiers that intercept repeated requests before they reach the origin.
Argo Smart Routing also helps choose upper-tier data centers for tiered cache topology—not only edge-to-origin paths.
Cache Reserve
Section titled “Cache Reserve”Cache Reserve uses persistent storage (backed by R2 in architecture docs) to keep long-tail, infrequently accessed assets from being evicted under LRU pressure—reducing surprise origin fetches for large or rarely hit files. Reads and writes can be metered when Cache Reserve is enabled (billing, optimize costs).
Smart Shield packages
Section titled “Smart Shield packages”Smart Shield get started groups origin protection and delivery features:
| Package | Includes (per docs) |
|---|---|
| Smart Shield | Smart Tiered Cache, Connection Reuse |
| Smart Shield + Argo | Above plus Argo Smart Routing |
| Smart Shield Advanced | Above plus Regional Tiered Cache, Cache Reserve; Enterprise may add dedicated CDN egress IPs |
Argo configuration under Smart Shield lists availability with Smart Shield + Argo and Smart Shield Advanced.
Argo Smart Routing: when to enable it and what it does
Section titled “Argo Smart Routing: when to enable it and what it does”People often enable Argo when visitors are far from the origin, cache misses are slow, or dynamic traffic still needs low latency to the server.
Cloudflare’s product page states:
Argo Smart Routing detects real-time network issues and routes your web traffic across the most efficient network path, avoiding congestion.
— Cloudflare, Argo Smart Routing
The CDN reference architecture adds that Argo uses real-time data from routing very large volumes of HTTP traffic and cites on average ~30% faster performance on web assets. Benefits are described as most apparent for users farthest from the origin.
Accelerate connections positions Argo alongside Early Hints (preload assets before full HTML arrives) as ways to cut latency from congestion and suboptimal routing.
Enable Argo Smart Routing in the dashboard: open Argo Smart Routing, set the toggle to On, and complete billing (API: PATCH with on or off). Enterprise customers may preview without some metered fees per product notes.
Google and Cloudflare on CDN value
Section titled “Google and Cloudflare on CDN value”On overlapping goals (performance, cost, resilience), Google emphasises caching to reduce origin load, flood protection, and reliability when the origin is down for static content. Cloudflare documentation stresses anycast edge delivery, tiered caching, and optional smart routing to the origin.
Common conclusion: A CDN’s main win is serving cacheable bytes from the edge; the second win is protecting and efficiently connecting to the origin on misses and dynamic requests—where Tiered Cache and Argo Smart Routing apply in Cloudflare’s model.
Cache configuration: rules, TTL, and purge
Section titled “Cache configuration: rules, TTL, and purge”Cache configuration how-to covers Cache Rules, Edge and Browser Cache TTL, cache keys, caching by status code, Tiered Cache, and purge.
Slow website troubleshooting recommends Caching → Cache Rules to cache more static content with appropriate Edge TTL, with a warning to be careful caching HTML or API responses that may be personalised.
Learning path: optimize caching notes you can extend caching to HTML with custom Cache Rules even though static types are cached by default.
To improve hit ratio, get started suggests choosing a cache level, enabling Tiered Cache with Argo, and tuning cache keys (some options Enterprise-only).
Purge (Cloudflare Cache) invalidates cached files globally so the next request fetches fresh content—by URL, tag, prefix, or hostname in advanced setups described in architecture content.
Reading cf-cache-status
Section titled “Reading cf-cache-status”A HIT means the resource was found in Cloudflare’s cache (cache responses). Use investigate uncached responses and Cache Analytics (dashboard: Caching → Overview) to find URLs that should cache but do not.
Cache security: poisoning and deception
Section titled “Cache security: poisoning and deception”Cache security covers poisoning, deception, and CORS.
Web cache poisoning (avoid web cache poisoning): an attacker crafts a request so the origin returns a harmful response that shares a cache key with a legitimate request; the CDN may then serve the poisoned object to others. CDNs rely on cache keys to decide hit versus origin fetch.
Web Cache Deception (Cache Deception Armor): a user visits a URL that looks like a static file but returns dynamic personalised HTML; if the edge caches it because of the extension, an attacker might later receive that cached private content. Cache Deception Armor can refuse to cache when the URL extension does not match the response Content-Type, with documented exceptions (for example application/octet-stream, some image format mismatches). Protection can be weakened if origin Cache-Control or Edge TTL rules override behavior.
Retention, eviction, and freshness
Section titled “Retention, eviction, and freshness”Retention vs freshness explains that objects stay in cache until evicted under an LRU policy when space is needed—retention is not directly configurable. TTL and revalidation control freshness; they are separate from how long an unpopular object might remain before eviction.
Common mistakes
Section titled “Common mistakes”- Proxying only DNS without orange-cloud proxying, then expecting global edge cache on that hostname.
- Caching HTML or APIs that vary per user without Vary, cache keys, or bypass rules—risking wrong content or deception scenarios.
- Assuming MIME type drives caching; Cloudflare uses extensions by default (default cache behavior).
- Enabling Ignore Query String globally without remembering it only applies to static extensions (caching levels).
- Paying for Argo on mostly cacheable sites without first raising cache hit ratio (optimize costs).
- Expecting Argo analytics before 500 origin-routed requests in 48 hours (Argo analytics).
How to check this on your site
Section titled “How to check this on your site”-
Confirm the hostname is proxied through Cloudflare (not DNS-only) so default CDN caching applies.
-
Open Cache Analytics under Caching → Overview and note hit ratio and top uncached URLs.
-
Fetch a static asset with
curl -Iand inspectcf-cache-statususing guidance from get started → Troubleshoot and cache response statuses. -
If origin latency matters globally, review Analytics → Performance for Argo TTFB views (Argo analytics) after sufficient traffic.
-
You can check automatically in Answerwell (our tool): https://answerwell.org/workspace
Report an error or ask a question
Section titled “Report an error or ask a question”If something on this page is wrong or unclear, email yimasynthetic@gmail.com with the page URL and the exact statement you are asking about, and we will correct or clarify it.