Skip to main content

CachePut

Trait CachePut 

Source
pub trait CachePut {
    // Required method
    fn cache_defaults() -> &'static CacheMetaDefaults;

    // Provided methods
    fn cacheable(&self, response: ResponseHeader) -> RespCacheable { ... }
    fn trace_header(&mut self, _response: &ResponseHeader) { ... }
}
Expand description

The interface to define cache put behavior

Required Methods§

Provided Methods§

Source

fn cacheable(&self, response: ResponseHeader) -> RespCacheable

Return whether to cache the asset according to the given response header.

Source

fn trace_header(&mut self, _response: &ResponseHeader)

Put interesting things in the span given the parsed response header.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§