Struct aws_sdk_lightsail::types::builders::CacheBehaviorBuilder
source · #[non_exhaustive]pub struct CacheBehaviorBuilder { /* private fields */ }
Expand description
A builder for CacheBehavior
.
Implementations§
source§impl CacheBehaviorBuilder
impl CacheBehaviorBuilder
sourcepub fn behavior(self, input: BehaviorEnum) -> Self
pub fn behavior(self, input: BehaviorEnum) -> Self
The cache behavior of the distribution.
The following cache behaviors can be specified:
-
cache
- This option is best for static sites. When specified, your distribution caches and serves your entire website as static content. This behavior is ideal for websites with static content that doesn't change depending on who views it, or for websites that don't use cookies, headers, or query strings to personalize content. -
dont-cache
- This option is best for sites that serve a mix of static and dynamic content. When specified, your distribution caches and serve only the content that is specified in the distribution'sCacheBehaviorPerPath
parameter. This behavior is ideal for websites or web applications that use cookies, headers, and query strings to personalize content for individual users.
sourcepub fn set_behavior(self, input: Option<BehaviorEnum>) -> Self
pub fn set_behavior(self, input: Option<BehaviorEnum>) -> Self
The cache behavior of the distribution.
The following cache behaviors can be specified:
-
cache
- This option is best for static sites. When specified, your distribution caches and serves your entire website as static content. This behavior is ideal for websites with static content that doesn't change depending on who views it, or for websites that don't use cookies, headers, or query strings to personalize content. -
dont-cache
- This option is best for sites that serve a mix of static and dynamic content. When specified, your distribution caches and serve only the content that is specified in the distribution'sCacheBehaviorPerPath
parameter. This behavior is ideal for websites or web applications that use cookies, headers, and query strings to personalize content for individual users.
sourcepub fn get_behavior(&self) -> &Option<BehaviorEnum>
pub fn get_behavior(&self) -> &Option<BehaviorEnum>
The cache behavior of the distribution.
The following cache behaviors can be specified:
-
cache
- This option is best for static sites. When specified, your distribution caches and serves your entire website as static content. This behavior is ideal for websites with static content that doesn't change depending on who views it, or for websites that don't use cookies, headers, or query strings to personalize content. -
dont-cache
- This option is best for sites that serve a mix of static and dynamic content. When specified, your distribution caches and serve only the content that is specified in the distribution'sCacheBehaviorPerPath
parameter. This behavior is ideal for websites or web applications that use cookies, headers, and query strings to personalize content for individual users.
sourcepub fn build(self) -> CacheBehavior
pub fn build(self) -> CacheBehavior
Consumes the builder and constructs a CacheBehavior
.
Trait Implementations§
source§impl Clone for CacheBehaviorBuilder
impl Clone for CacheBehaviorBuilder
source§fn clone(&self) -> CacheBehaviorBuilder
fn clone(&self) -> CacheBehaviorBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CacheBehaviorBuilder
impl Debug for CacheBehaviorBuilder
source§impl Default for CacheBehaviorBuilder
impl Default for CacheBehaviorBuilder
source§fn default() -> CacheBehaviorBuilder
fn default() -> CacheBehaviorBuilder
source§impl PartialEq for CacheBehaviorBuilder
impl PartialEq for CacheBehaviorBuilder
source§fn eq(&self, other: &CacheBehaviorBuilder) -> bool
fn eq(&self, other: &CacheBehaviorBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for CacheBehaviorBuilder
Auto Trait Implementations§
impl Freeze for CacheBehaviorBuilder
impl RefUnwindSafe for CacheBehaviorBuilder
impl Send for CacheBehaviorBuilder
impl Sync for CacheBehaviorBuilder
impl Unpin for CacheBehaviorBuilder
impl UnwindSafe for CacheBehaviorBuilder
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