Cache settings

Configures cache lifetime for objects stored in the Fastly cache, overriding cache freshness information that would otherwise be determined from cache-related headers on the HTTP response. When used in conjunction with conditions, cache settings objects provide detailed control over how long content persists in the cache.

Data model

actionstringIf set, will cause vcl_fetch to terminate after processing this rule with the return state specified. If not set, other configuration logic in vcl_fetch with a lower priority will run after this rule.
cache_conditionstringName of the cache condition controlling when this configuration applies.
namestringName for the cache settings object.
stale_ttlstringMaximum time in seconds to continue to use a stale version of the object if future requests to your backend server fail (also known as 'stale if error').
ttlstringMaximum time to consider the object fresh in the cache (the cache 'time to live').
created_atstringDate and time in ISO 8601 format. Read-only.
deleted_atstringDate and time in ISO 8601 format. Read-only.
service_idstringAlphanumeric string identifying the service. Read-only.
updated_atstringDate and time in ISO 8601 format. Read-only.
versionstringString identifying a service version. Read-only.


List cache settings objects


Create a cache settings object


Get a cache settings object


Update a cache settings object


Delete a cache settings object