Trait reqwest_middleware_cache::CacheManager [−][src]
pub trait CacheManager {
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request
) -> Pin<Box<dyn Future<Output = Result<Option<(Response, CachePolicy)>>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn put<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request,
res: Response,
policy: CachePolicy
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
req: &'life1 Request
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
}Expand description
A trait providing methods for storing, reading, and removing cache records.
Required methods
Attempts to pull a cached reponse and related policy from cache.
Attempts to cache a response and related policy.