CloudFrontCachePolicySchema
Index
Properties
optionalcookies
Which cookies are part of the cache key. See ICloudFrontValueSelection.
optionaldefaultTtl
How long an object stays cached when the origin sent neither Cache-Control nor Expires, in
seconds.
optionalenableBrotli
Whether CloudFront caches a brotli-compressed copy for viewers that accept one. A behavior's
compress serves brotli only when this is true.
optionalenableGzip
Whether CloudFront caches a gzip-compressed copy for viewers that accept one. A behavior's
compress serves gzip only when this is true.
optionalheaders
Which request headers are part of the cache key. See ICloudFrontValueSelection.
optionalmaxTtl
The longest an object stays cached when the origin's Cache-Control or Expires asks for
longer, in seconds.
optionalminTtl
The shortest an object stays cached, in seconds. Above 0, it holds even when the origin sends
no-cache, no-store, or private.
name
How a behavior names this policy. It is also the policy's name in AWS, which must be unique across the account.
optionalqueryStrings
Which query strings are part of the cache key. Their order matters too: ?a=1&b=2 and
?b=2&a=1 are cached apart. See ICloudFrontValueSelection.
A cache policy this distribution declares, referenced by a behavior under
{ kind: 'custom', name }. It decides the cache key - what makes two requests different objects - and how long an object stays cached.Everything in the cache key also reaches the origin. With all three TTLs at
0, nothing is cached. AWS: cache policies.Resources/CloudFrontDistribution