- Property Manager name: Cache HTTP Error Responses
- Behavior version: The
latest
rule format supports thecacheError
behavior v1.1. - Rule format status: Beta, possible breaking changes
- Access: Read/Write
- Allowed in includes: Not available for
latest
rule format
With the caching
behavior also enabled, this caches the origin's error responses to decrease server load. It 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.
Note that the cacheError
behavior works only with the caching
behavior enabled.
Option | Type | Description | Requires | |
---|---|---|---|---|
enabled | boolean | Activates the error-caching behavior. | {"displayType":"boolean","tag":"input","type":"checkbox"} | |
ttl | string (duration) | Overrides the default caching duration of | {"displayType":"string","tag":"input","type":"text"} {"if":{"attribute":"enabled","op":"eq","value":true}} | |
preserveStale | boolean | When enabled, the edge server preserves stale cached objects when the origin returns | {"displayType":"boolean","tag":"input","type":"checkbox"} {"if":{"attribute":"enabled","op":"eq","value":true}} |