pub trait CachePolicy:
Default
+ Clone
+ Send
+ Sync
+ 'static {
type Store: CacheStore + Send + Sync + 'static;
// Provided methods
fn cache_key(
&self,
ctx: &RequestContext,
req: &Request<Body>,
) -> Option<String> { ... }
fn ttl_seconds(&self) -> Option<u64> { ... }
fn should_cache_response(&self, response: &Response) -> bool { ... }
}Required Associated Types§
type Store: CacheStore + Send + Sync + 'static
Provided Methods§
fn cache_key(&self, ctx: &RequestContext, req: &Request<Body>) -> Option<String>
fn ttl_seconds(&self) -> Option<u64>
fn should_cache_response(&self, response: &Response) -> bool
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.