pub trait CacheStore: Send + Sync + 'static {
    type Error: StdError + Sync + Send + 'static;
    type Key: Hash + Eq + Send + Clone + 'static;

    fn load_entry<'life0, 'life1, 'async_trait, Q>(
        &'life0 self,
        key: &'life1 Q
    ) -> Pin<Box<dyn Future<Output = Option<CachedEntry>> + Send + 'async_trait>>
    where
        Self::Key: Borrow<Q>,
        Q: Hash + Eq + Sync + 'async_trait,
        Self: 'async_trait,
        'life0: 'async_trait,
        'life1: 'async_trait
; fn save_entry<'life0, 'async_trait>(
        &'life0 self,
        key: Self::Key,
        data: CachedEntry
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
    where
        Self: 'async_trait,
        'life0: 'async_trait
; }
Expand description

Store cache.

Required Associated Types§

Error type for CacheStore.

Key

Required Methods§

source

fn load_entry<'life0, 'life1, 'async_trait, Q>(
    &'life0 self,
    key: &'life1 Q
) -> Pin<Box<dyn Future<Output = Option<CachedEntry>> + Send + 'async_trait>>where
    Self::Key: Borrow<Q>,
    Q: Hash + Eq + Sync + 'async_trait,
    Self: 'async_trait,
    'life0: 'async_trait,
    'life1: 'async_trait,

Get the cache item from the store.

source

fn save_entry<'life0, 'async_trait>(
    &'life0 self,
    key: Self::Key,
    data: CachedEntry
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
    Self: 'async_trait,
    'life0: 'async_trait,

Save the cache item from the store.

Implementors§