Struct kvarn::prelude::utils::parse::CacheControl

source ·
pub struct CacheControl { /* private fields */ }
Expand description

Directives to limit cache lifetime, read from cache-control and kvarn-cache-control headers.

See Self::from_cache_control and Self::from_kvarn_cache_control for respective parsing.

Implementations§

source§

impl CacheControl

source

pub fn from_cache_control( header: &str ) -> Result<CacheControl, CacheControlError>

Respects max-age= and no-store parts of cache-control header.

Uses the standard syntax.

§Errors

Can return CacheControlError::MultipleMaxAge and CacheControlError::InvalidInteger.