[][src]Struct rusoto_lightsail::CacheSettings

pub struct CacheSettings {
    pub allowed_http_methods: Option<String>,
    pub cached_http_methods: Option<String>,
    pub default_ttl: Option<i64>,
    pub forwarded_cookies: Option<CookieObject>,
    pub forwarded_headers: Option<HeaderObject>,
    pub forwarded_query_strings: Option<QueryStringObject>,
    pub maximum_ttl: Option<i64>,
    pub minimum_ttl: Option<i64>,
}

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.

Fields

allowed_http_methods: Option<String>

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.

cached_http_methods: Option<String>

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.

default_ttl: Option<i64>

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: Option<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: Option<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: Option<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: Option<i64>

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: Option<i64>

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.

Trait Implementations

impl Clone for CacheSettings[src]

impl Debug for CacheSettings[src]

impl Default for CacheSettings[src]

impl<'de> Deserialize<'de> for CacheSettings[src]

impl PartialEq<CacheSettings> for CacheSettings[src]

impl Serialize for CacheSettings[src]

impl StructuralPartialEq for CacheSettings[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.