Docs Cache Cache settings reference Every cache and Early Hints setting with its default and limits, the purge API and limits, the CLI commands and MCP tools.
On this page # Cache settings
Keys under cache in the zone's edge settings (GET/PATCH /v1/orgs/{org}/zones/{zone}/edge), overridable per name under hosts.<name>.cache.
Key Values Default cache.enabledtrue, falsefalsecache.dev_mode_untilRFC 3339 time, or null (off) off cache.query.modeall, ignore, none, include, excludeallcache.query.paramsParameter names (trailing * = prefix); required with include/exclude []cache.query.sorttrue, falsefalsecache.browser_ttlSeconds, 0–31536000; 0 = respect the origin 0cache.deception_armortrue, falsetruecache.serve_stale.while_revalidatetrue, falsetruecache.serve_stale.on_error_max_sSeconds, 0–2592000; 0 = never 86400cache.max_object_mb1–512100cache.rulesUp to 25 cache rules []
The PATCH body is a JSON merge patch: objects merge field by field, lists (rules, query.params) are replaced whole, "dev_mode_until": null turns development mode off and "cache": null restores every default.
# Cache rule limits
Item Limit Rules per zone or per name 25 Values per condition list 32 Status ranges per rule 10, codes 100–599 TTLs (edge_ttl.ttl_s, browser_ttl.ttl_s, status TTLs) 1 second to 1 year; status TTLs also 0 (always revalidate) and -1 (don't store) serve_stale.on_error_max_sUp to 30 days Extension Letters and digits, up to 16 characters Rule id Letters, digits, - and _; default r1, r2…
# Fixed behavior
Item Value Default TTL without freshness headers 2 h (200, 206, 301), 20 min (302, 303), 3 min (404, 410) Framework build directories 7 days Longest life of an object 30 days Longest cache key 4 KB Wait for a concurrent miss of the same object 5 seconds
# Early Hints settings
Key Values Default early_hints.enabledtrue, falsefalseearly_hints.modeorigin_links, html_head, bothbothearly_hints.extra_originsUp to 10 https://host[:port] origins []
See Early Hints .
# Purge API
Route Role Purpose POST /v1/orgs/{org}/zones/{zone}/cache/purgetech or purge-only tokenPurge. Body: exactly one of purge_everything, files, prefixes, hosts, tags (≤ 100 values). ?dry_run=1 normalizes without purging. GET /v1/orgs/{org}/zones/{zone}/cache/purges?limit=Nany, or purge-only token Recent purges (newest first, at most 100) with nodes and applied.
Status Code When 409zone_not_activeThe zone isn't active. 429rate_limitedOver 10 purges per minute (burst 30) for everything, prefixes, hostnames and tags, or 500 URLs per minute. Retry-After says when to retry. 403token_scopeA purge-only token called any other route.
# CLI
Command Purpose openwaf-cloud ctl zones set <zone> [--host <name>] cache.…=… early_hints.…=…Change cache and Early Hints settings. openwaf-cloud ctl zones set <zone> --host <name> --unset cacheThe name inherits the zone's cache again. openwaf-cloud ctl zones effective <zone> <name>Effective cache of a name. openwaf-cloud ctl cache purge <zone> --everything | --url U… | --prefix host/path… | --host name… | --tag t…Purge. openwaf-cloud ctl cache purges <zone> [--limit N]Recent purges and their propagation.
# MCP tools
Tool Purpose update_settingsChange cache and early_hints (with host for one name). effective_configEffective configuration of one name, cache included. purge_cachePurge (two steps).
Previous103 Early Hints Next Troubleshooting the cache