Struct rusoto_cloudfront::CachePolicyConfig
source · [−]pub struct CachePolicyConfig {
pub comment: Option<String>,
pub default_ttl: Option<i64>,
pub max_ttl: Option<i64>,
pub min_ttl: i64,
pub name: String,
pub parameters_in_cache_key_and_forwarded_to_origin: Option<ParametersInCacheKeyAndForwardedToOrigin>,
}
Expand description
A cache policy configuration.
This configuration determines the following:
-
The values that CloudFront includes in the cache key. These values can include HTTP headers, cookies, and URL query strings. CloudFront uses the cache key to find an object in its cache that it can return to the viewer.
-
The default, minimum, and maximum time to live (TTL) values that you want objects to stay in the CloudFront cache.
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
.
Fields
comment: Option<String>
A comment to describe the cache policy. The comment cannot be longer than 128 characters.
default_ttl: Option<i64>
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) 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
.
max_ttl: Option<i64>
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) 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
.
min_ttl: i64
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) in the Amazon CloudFront Developer Guide.
name: String
A unique name to identify the cache policy.
parameters_in_cache_key_and_forwarded_to_origin: Option<ParametersInCacheKeyAndForwardedToOrigin>
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.
Trait Implementations
sourceimpl Clone for CachePolicyConfig
impl Clone for CachePolicyConfig
sourcefn clone(&self) -> CachePolicyConfig
fn clone(&self) -> CachePolicyConfig
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for CachePolicyConfig
impl Debug for CachePolicyConfig
sourceimpl Default for CachePolicyConfig
impl Default for CachePolicyConfig
sourcefn default() -> CachePolicyConfig
fn default() -> CachePolicyConfig
Returns the “default value” for a type. Read more
sourceimpl PartialEq<CachePolicyConfig> for CachePolicyConfig
impl PartialEq<CachePolicyConfig> for CachePolicyConfig
sourcefn eq(&self, other: &CachePolicyConfig) -> bool
fn eq(&self, other: &CachePolicyConfig) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &CachePolicyConfig) -> bool
fn ne(&self, other: &CachePolicyConfig) -> bool
This method tests for !=
.
impl StructuralPartialEq for CachePolicyConfig
Auto Trait Implementations
impl RefUnwindSafe for CachePolicyConfig
impl Send for CachePolicyConfig
impl Sync for CachePolicyConfig
impl Unpin for CachePolicyConfig
impl UnwindSafe for CachePolicyConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more