How Quant caches
Quant caches responses at the edge and keeps them until they expire or you purge them. Check what a
path sends with curl -sI https://www.example.com/path and look at cache-control and age.
Headers Quant uses
Section titled “Headers Quant uses”| Response header | Edge behaviour |
|---|---|
Cache-Control: s-maxage=N |
The edge keeps the response N seconds. Browsers use max-age |
Cache-Control: public, max-age=N (no s-maxage) |
The edge and browsers keep it N seconds |
Cache-Control: private or no-store |
Not cached at the edge |
Surrogate-Control: max-age=N |
Honoured on QuantCDN only. QuantGov ignores it; use Cache-Control: s-maxage=N |
Cache-Keys: a b |
Tags the response for purge by cache key. Removed before the response reaches the browser |
Defaults
Section titled “Defaults”When nothing sets Cache-Control:
- Deployed static pages and files get a long edge lifetime, and Quant relies on purges: every change made through the content API purges the changed path. Check the actual header with
curl -sI. - Files can also be cached by browsers, and a purge does not reach browsers. Use fingerprinted file names (for example
app.3f9a1c.js) for files that change. - Proxied responses keep the origin’s
Cache-Control. Set the header at the origin, or set the proxy rule’s cache lifetime, rather than relying on a default. - Edge functions send
Cache-Control: private, max-age=0unless the function sets the header.
Query strings
Section titled “Query strings”Each query-string variant is a separate cache entry. /news and /news?page=2 are cached and purged separately.
What purges automatically
Section titled “What purges automatically”quant deploy, pushing a page or file, publishing a revision and unpublishing (from the CLI, the
API or the dashboard editor) purge each path they change. Paths that did not change are not purged.
When to purge
Section titled “When to purge”- After a deploy, if unchanged pages show shared content that changed (menus, footers, listings): purge
/*, as the Quant templates do withpurge-action. - After a rule change. A cached response is served without the rules running again, and a rule change purges nothing.
- After changing cache headers at the origin or a proxy cache lifetime. Otherwise the old lifetime stays in force until it expires.
Cache warming
Section titled “Cache warming”Quant has no cache-warming feature. After a purge, the first request for each path fetches it again. To warm important pages, request them yourself at a modest rate (for example, the URLs in your sitemap). The crawler does not warm the cache: it fetches a site and stores the pages as static content in the project.
