Struct aws_sdk_cloudfront::types::CachePolicy
source · #[non_exhaustive]pub struct CachePolicy {
pub id: String,
pub last_modified_time: DateTime,
pub cache_policy_config: Option<CachePolicyConfig>,
}
Expand description
A cache policy.
When it's attached to a cache behavior, the cache policy 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 also 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 (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.id: String
The unique identifier for the cache policy.
last_modified_time: DateTime
The date and time when the cache policy was last modified.
cache_policy_config: Option<CachePolicyConfig>
The cache policy configuration.
Implementations§
source§impl CachePolicy
impl CachePolicy
sourcepub fn last_modified_time(&self) -> &DateTime
pub fn last_modified_time(&self) -> &DateTime
The date and time when the cache policy was last modified.
sourcepub fn cache_policy_config(&self) -> Option<&CachePolicyConfig>
pub fn cache_policy_config(&self) -> Option<&CachePolicyConfig>
The cache policy configuration.
source§impl CachePolicy
impl CachePolicy
sourcepub fn builder() -> CachePolicyBuilder
pub fn builder() -> CachePolicyBuilder
Creates a new builder-style object to manufacture CachePolicy
.
Trait Implementations§
source§impl Clone for CachePolicy
impl Clone for CachePolicy
source§fn clone(&self) -> CachePolicy
fn clone(&self) -> CachePolicy
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CachePolicy
impl Debug for CachePolicy
source§impl PartialEq for CachePolicy
impl PartialEq for CachePolicy
source§fn eq(&self, other: &CachePolicy) -> bool
fn eq(&self, other: &CachePolicy) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for CachePolicy
Auto Trait Implementations§
impl Freeze for CachePolicy
impl RefUnwindSafe for CachePolicy
impl Send for CachePolicy
impl Sync for CachePolicy
impl Unpin for CachePolicy
impl UnwindSafe for CachePolicy
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more