API reference
Page cache
Public pages are cached in memory after the first render and then served directly – without database access or template rendering.
- Key: website + path + query string (
/blog?seite=2is a separate entry; identical paths of different websites are kept apart). - Expiry: entries expire at midnight (server time) at the latest, so that
todayin templates is correct. - Invalidation: every successful change via the API (pages, snippets, CSS/JS, collections, entries, files, REST sources, workflows – including changes a workflow makes via the API) and every completed import clears the entire cache. Read-only calls such as the preview,
POST /markdownorPOST /sources/testleave it untouched. - REST sources: if a page uses
data()with a REST source, it stays in the cache at most as long as that source’scache_ttl. Withcache_ttl: 0, it is not cached. - Exceptions: pages with
no_cache: true, admin previews (?preview=1), 404 and error pages are never cached. - Size: limited via the startup option
-cache-mb(default 128,0= off); when exceeded, the least recently used pages are evicted. - HTTP: responses carry
ETagandCache-Control: no-cache– browsers revalidate withIf-None-Matchand receive304 Not Modifiedfor unchanged pages. gzip is precomputed once per entry. TheX-Cacheheader showsHIT,MISSorBYPASS.
GET /cache 🔑
{ "enabled": true, "entries": 42, "bytes": 3145728, "max_bytes": 134217728, "hits": 1290, "misses": 57 }
DELETE /cache ✏️
Clears the cache manually. 204.