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.

KeyValuesDefault
cache.enabledtrue, falsefalse
cache.dev_mode_untilRFC 3339 time, or null (off)off
cache.query.modeall, ignore, none, include, excludeall
cache.query.paramsParameter names (trailing * = prefix); required with include/exclude[]
cache.query.sorttrue, falsefalse
cache.browser_ttlSeconds, 0–31536000; 0 = respect the origin0
cache.deception_armortrue, falsetrue
cache.serve_stale.while_revalidatetrue, falsetrue
cache.serve_stale.on_error_max_sSeconds, 0–2592000; 0 = never86400
cache.max_object_mb1–512100
cache.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

ItemLimit
Rules per zone or per name25
Values per condition list32
Status ranges per rule10, 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
ExtensionLetters and digits, up to 16 characters
Rule idLetters, digits, - and _; default r1, r2…

Fixed behavior

ItemValue
Default TTL without freshness headers2 h (200, 206, 301), 20 min (302, 303), 3 min (404, 410)
Framework build directories7 days
Longest life of an object30 days
Longest cache key4 KB
Wait for a concurrent miss of the same object5 seconds

Early Hints settings

KeyValuesDefault
early_hints.enabledtrue, falsefalse
early_hints.modeorigin_links, html_head, bothboth
early_hints.extra_originsUp to 10 https://host[:port] origins[]

See Early Hints.

Purge API

RouteRolePurpose
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 tokenRecent purges (newest first, at most 100) with nodes and applied.
StatusCodeWhen
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

CommandPurpose
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

ToolPurpose
update_settingsChange cache and early_hints (with host for one name).
effective_configEffective configuration of one name, cache included.
purge_cachePurge (two steps).

Last updated:

↑↓ to navigate↵ to openesc to close