class Aws::CloudFront::Types::CachePolicyConfig

A cache policy configuration.

This configuration determines the following:

The headers, cookies, and query strings that are included in the cache key are automatically included in requests that CloudFront sends to the origin. CloudFront sends a request when it can’t find a valid object in its cache that matches the request’s cache key. If you want to send values to the origin but not include them in the cache key, use `OriginRequestPolicy`.

@note When making an API call, you may pass CachePolicyConfig

data as a hash:

    {
      comment: "string",
      name: "string", # required
      default_ttl: 1,
      max_ttl: 1,
      min_ttl: 1, # required
      parameters_in_cache_key_and_forwarded_to_origin: {
        enable_accept_encoding_gzip: false, # required
        enable_accept_encoding_brotli: false,
        headers_config: { # required
          header_behavior: "none", # required, accepts none, whitelist
          headers: {
            quantity: 1, # required
            items: ["string"],
          },
        },
        cookies_config: { # required
          cookie_behavior: "none", # required, accepts none, whitelist, allExcept, all
          cookies: {
            quantity: 1, # required
            items: ["string"],
          },
        },
        query_strings_config: { # required
          query_string_behavior: "none", # required, accepts none, whitelist, allExcept, all
          query_strings: {
            quantity: 1, # required
            items: ["string"],
          },
        },
      },
    }

@!attribute [rw] comment

A comment to describe the cache policy. The comment cannot be longer
than 128 characters.
@return [String]

@!attribute [rw] name

A unique name to identify the cache policy.
@return [String]

@!attribute [rw] default_ttl

The default amount of time, in seconds, that you want objects to
stay in the CloudFront cache before CloudFront sends another request
to the origin to see if the object has been updated. CloudFront uses
this value as the object’s time to live (TTL) only when the origin
does *not* send `Cache-Control` or `Expires` headers with the
object. For more information, see [Managing How Long Content Stays
in an Edge Cache (Expiration)][1] in the *Amazon CloudFront
Developer Guide*.

The default value for this field is 86400 seconds (one day). If the
value of `MinTTL` is more than 86400 seconds, then the default value
for this field is the same as the value of `MinTTL`.

[1]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html
@return [Integer]

@!attribute [rw] max_ttl

The maximum amount of time, in seconds, that objects stay in the
CloudFront cache before CloudFront sends another request to the
origin to see if the object has been updated. CloudFront uses this
value only when the origin sends `Cache-Control` or `Expires`
headers with the object. For more information, see [Managing How
Long Content Stays in an Edge Cache (Expiration)][1] in the *Amazon
CloudFront Developer Guide*.

The default value for this field is 31536000 seconds (one year). If
the value of `MinTTL` or `DefaultTTL` is more than 31536000 seconds,
then the default value for this field is the same as the value of
`DefaultTTL`.

[1]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html
@return [Integer]

@!attribute [rw] min_ttl

The minimum amount of time, in seconds, that you want objects to
stay in the CloudFront cache before CloudFront sends another request
to the origin to see if the object has been updated. For more
information, see [Managing How Long Content Stays in an Edge Cache
(Expiration)][1] in the *Amazon CloudFront Developer Guide*.

[1]: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html
@return [Integer]

@!attribute [rw] parameters_in_cache_key_and_forwarded_to_origin

The HTTP headers, cookies, and URL query strings to include in the
cache key. The values included in the cache key are automatically
included in requests that CloudFront sends to the origin.
@return [Types::ParametersInCacheKeyAndForwardedToOrigin]

@see docs.aws.amazon.com/goto/WebAPI/cloudfront-2020-05-31/CachePolicyConfig AWS API Documentation

Constants

SENSITIVE