Enum fastly::handle::CacheOverride[][src]

pub enum CacheOverride {
    Override {
        ttl: Option<u32>,
        stale_while_revalidate: Option<u32>,
        pci: bool,
        surrogate_key: Option<HeaderValue>,

Optional override for response caching behavior.



Do not override the behavior specified in the origin response’s cache control headers.


Do not cache the response to this request, regardless of the origin response’s headers.


Override particular cache control settings.

The origin response’s cache control headers will be used for ttl and stale_while_revalidate if None.

Fields of Override

ttl: Option<u32>stale_while_revalidate: Option<u32>pci: boolsurrogate_key: Option<HeaderValue>


impl CacheOverride[src]

pub const fn none() -> CacheOverride[src]

pub const fn pass() -> CacheOverride[src]

pub fn is_pass(&self) -> bool[src]

pub const fn ttl(ttl: u32) -> CacheOverride[src]

pub const fn stale_while_revalidate(swr: u32) -> CacheOverride[src]

pub const fn pci(pci: bool) -> CacheOverride[src]

pub const fn surrogate_key(sk: HeaderValue) -> CacheOverride[src]

pub fn set_none(&mut self)[src]

pub fn set_pass(&mut self, pass: bool)[src]

pub fn set_ttl(&mut self, new_ttl: u32)[src]

pub fn set_stale_while_revalidate(&mut self, new_swr: u32)[src]

pub fn set_pci(&mut self, new_pci: bool)[src]

pub fn set_surrogate_key(&mut self, new_surrogate_key: HeaderValue)[src]

pub const fn default() -> CacheOverride[src]

Trait Implementations

impl Clone for CacheOverride[src]

impl Debug for CacheOverride[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

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

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.