GuideReference
TrainingSupportCommunity
Reference

cache_​error


Caches the origin's error responses to decrease server load. Applies for 10 seconds by default to the following HTTP codes: 204, 305, 404, 405, 501, 502, 503, 504, and 505.

This behavior no longer caches 400 error responses from the origin server. If you need to cache such errors, you can set up a custom variable. See Caching 400 responses for more information.

OptionTypeDescriptionRequires
enabledboolean

Activates the error-caching behavior.

{"displayType":"boolean","tag":"input","type":"checkbox"}
ttlstring (duration)

Overrides the default caching duration of 10s. Note that if set to 0, it is equivalent to no-cache, which forces revalidation and may cause a traffic spike. This can be counterproductive when, for example, the origin is producing an error code of 500.

{"displayType":"string","tag":"input","type":"text"}
{"if":{"attribute":"enabled","op":"eq","value":true}}
preserve_​staleboolean

When enabled, the edge server preserves stale cached objects when the origin returns 500, 502, 503, and 504 error codes. This avoids re-fetching and re-caching content after transient errors.

{"displayType":"boolean","tag":"input","type":"checkbox"}
{"if":{"attribute":"enabled","op":"eq","value":true}}