class Aws::Lightsail::Types::CacheSettings

Describes the cache settings of an Amazon Lightsail content delivery network (CDN) distribution.

These settings apply only to your distribution's `cacheBehaviors` (including the `defaultCacheBehavior`) that have a `behavior` of `cache`.

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

data as a hash:

    {
      default_ttl: 1,
      minimum_ttl: 1,
      maximum_ttl: 1,
      allowed_http_methods: "NonEmptyString",
      cached_http_methods: "NonEmptyString",
      forwarded_cookies: {
        option: "none", # accepts none, allow-list, all
        cookies_allow_list: ["string"],
      },
      forwarded_headers: {
        option: "none", # accepts none, allow-list, all
        headers_allow_list: ["Accept"], # accepts Accept, Accept-Charset, Accept-Datetime, Accept-Encoding, Accept-Language, Authorization, CloudFront-Forwarded-Proto, CloudFront-Is-Desktop-Viewer, CloudFront-Is-Mobile-Viewer, CloudFront-Is-SmartTV-Viewer, CloudFront-Is-Tablet-Viewer, CloudFront-Viewer-Country, Host, Origin, Referer
      },
      forwarded_query_strings: {
        option: false,
        query_strings_allow_list: ["string"],
      },
    }

@!attribute [rw] default_ttl

The default amount of time that objects stay in the distribution's
cache before the distribution forwards another request to the origin
to determine whether the content has been updated.

<note markdown="1"> The value specified applies only when the origin does not add HTTP
headers such as `Cache-Control max-age`, `Cache-Control s-maxage`,
and `Expires` to objects.

 </note>
@return [Integer]

@!attribute [rw] minimum_ttl

The minimum amount of time that objects stay in the distribution's
cache before the distribution forwards another request to the origin
to determine whether the object has been updated.

A value of `0` must be specified for `minimumTTL` if the
distribution is configured to forward all headers to the origin.
@return [Integer]

@!attribute [rw] maximum_ttl

The maximum amount of time that objects stay in the distribution's
cache before the distribution forwards another request to the origin
to determine whether the object has been updated.

The value specified applies only when the origin adds HTTP headers
such as `Cache-Control max-age`, `Cache-Control s-maxage`, and
`Expires` to objects.
@return [Integer]

@!attribute [rw] allowed_http_methods

The HTTP methods that are processed and forwarded to the
distribution's origin.

You can specify the following options:

* `GET,HEAD` - The distribution forwards the `GET` and `HEAD`
  methods.

* `GET,HEAD,OPTIONS` - The distribution forwards the `GET`, `HEAD`,
  and `OPTIONS` methods.

* `GET,HEAD,OPTIONS,PUT,PATCH,POST,DELETE` - The distribution
  forwards the `GET`, `HEAD`, `OPTIONS`, `PUT`, `PATCH`, `POST`, and
  `DELETE` methods.

If you specify the third option, you might need to restrict access
to your distribution's origin so users can't perform operations
that you don't want them to. For example, you might not want users
to have permission to delete objects from your origin.
@return [String]

@!attribute [rw] cached_http_methods

The HTTP method responses that are cached by your distribution.

You can specify the following options:

* `GET,HEAD` - The distribution caches responses to the `GET` and
  `HEAD` methods.

* `GET,HEAD,OPTIONS` - The distribution caches responses to the
  `GET`, `HEAD`, and `OPTIONS` methods.
@return [String]

@!attribute [rw] forwarded_cookies

An object that describes the cookies that are forwarded to the
origin. Your content is cached based on the cookies that are
forwarded.
@return [Types::CookieObject]

@!attribute [rw] forwarded_headers

An object that describes the headers that are forwarded to the
origin. Your content is cached based on the headers that are
forwarded.
@return [Types::HeaderObject]

@!attribute [rw] forwarded_query_strings

An object that describes the query strings that are forwarded to the
origin. Your content is cached based on the query strings that are
forwarded.
@return [Types::QueryStringObject]

@see docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/CacheSettings AWS API Documentation

Constants

SENSITIVE