CacheSettings
¶
Used by
Source code in docs_src/capo_lightsail/types/cache_settings.py
allowed_http_methods
instance-attribute
¶
allowed_http_methods: NotRequired[NonEmptyString]
The HTTP methods that are processed and forwarded to the distribution's origin.
You can specify the following options:
-
GET,HEAD- The distribution forwards theGETandHEADmethods. -
GET,HEAD,OPTIONS- The distribution forwards theGET,HEAD, andOPTIONSmethods. -
GET,HEAD,OPTIONS,PUT,PATCH,POST,DELETE- The distribution forwards theGET,HEAD,OPTIONS,PUT,PATCH,POST, andDELETEmethods.
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.
cached_http_methods
instance-attribute
¶
cached_http_methods: NotRequired[NonEmptyString]
The HTTP method responses that are cached by your distribution.
You can specify the following options:
-
GET,HEAD- The distribution caches responses to theGETandHEADmethods. -
GET,HEAD,OPTIONS- The distribution caches responses to theGET,HEAD, andOPTIONSmethods.
default_ttl
instance-attribute
¶
default_ttl: NotRequired[long]
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.
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.
forwarded_cookies
instance-attribute
¶
forwarded_cookies: NotRequired[CookieObject]
An object that describes the cookies that are forwarded to the origin. Your content is cached based on the cookies that are forwarded.
forwarded_headers
instance-attribute
¶
forwarded_headers: NotRequired[HeaderObject]
An object that describes the headers that are forwarded to the origin. Your content is cached based on the headers that are forwarded.
forwarded_query_strings
instance-attribute
¶
forwarded_query_strings: NotRequired[QueryStringObject]
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.
maximum_ttl
instance-attribute
¶
maximum_ttl: NotRequired[long]
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.
minimum_ttl
instance-attribute
¶
minimum_ttl: NotRequired[long]
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.