pub struct CacheControl {
pub static_assets: String,
pub dynamic_assets: String,
}Expand description
Global cache-control configuration for static and dynamic assets.
Static assets are files embedded via include_dir and served directly.
Dynamic assets are generated by route handlers at request time.
These values are used as defaults; per-route overrides can be applied via handler response headers.
Fields§
§static_assets: StringCache-Control for static assets embedded via include_dir.
Default: "public, max-age=31536000, immutable"
dynamic_assets: StringCache-Control for dynamically generated assets.
Default: "public, no-cache, no-store"
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CacheControl
impl RefUnwindSafe for CacheControl
impl Send for CacheControl
impl Sync for CacheControl
impl Unpin for CacheControl
impl UnsafeUnpin for CacheControl
impl UnwindSafe for CacheControl
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
Mutably borrows from an owned value. Read more