Skip to main content

Browser caching & query strings

Two general-settings groups control how content is cached: browser caching (the Cache-Control TTL sent to visitors) and query string handling (which query parameters are part of the cache key). Both live in the property's General tab.

Browser caching

The browser_caching setting decides whether the cache TTL comes from your origin or is overridden by the panel.

modePanel labelBehavior
originOrigin ControlledPass the origin's caching headers through unchanged.
overridePanel Controlled (Override)Force a fixed TTL regardless of the origin.

When mode is override, set ttl (in seconds). The default is 3600. The TTL dropdown offers these presets:

PresetSeconds
5s5
30s30
2m120
5m300
1h3600
1d86400
1w604800
1mo2592000
1y31536000
{
"browser_caching": { "mode": "override", "ttl": 3600 }
}
note

When mode is not override (that is, origin), ttl is saved as 0. The TTL value is only meaningful in override mode.

Query strings

The query_string setting controls how query parameters affect the cache key — whether two URLs that differ only by query string are treated as the same cached object.

modePanel optionEffect
none(off)Default behavior; query string not stripped from the key.
ignore_all"Ignore All"Ignore the entire query string when caching.
except"Ignore All Except…"Ignore everything except the parameters in values[].
only"Ignore Only…"Ignore only the parameters in values[]; keep the rest.

values[] is a list of parameter names and is only sent for except and only modes.

{
"query_string": { "mode": "except", "values": ["page", "lang"] }
}

:::info Panel "all" maps to ignore_all The panel UI uses all internally for the "Ignore All" option, but it is saved to the API as ignore_all. The accepted persisted values are exactly none, ignore_all, except, and only. :::

The critical gotcha: send the full object

General settings are stored as a single snake_case JSONB blob, and the API does not merge partial updates.

:::danger Always send the complete general-settings object A PUT to /general-settings replaces the stored blob. If you send only browser_caching, you risk wiping query_string, hsts, image_optimization, and every other field. The panel always reads the current settings, spreads them, applies your change, and sends the full object back.

When scripting against the API, do the same: GET the current general settings, modify the field you care about, then PUT the entire object. :::

# 1) Fetch current settings
curl "https://api.paradarum.com/api/property/42/general-settings?accountId=123" \
-H "X-API-Key: pdm_YOUR_KEY"

# 2) Modify locally, then PUT the WHOLE object back
curl -X PUT "https://api.paradarum.com/api/property/42/general-settings?accountId=123" \
-H "X-API-Key: pdm_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"hsts": { "enabled": true, "max_age": 31536000, "include_subdomains": true, "preload": true },
"clickjacking_protection": true,
"mime_sniffing_protection": true,
"browser_caching": { "mode": "override", "ttl": 3600 },
"query_string": { "mode": "except", "values": ["page", "lang"] }
}'