Trait deno_cache::Cache

source ·
pub trait Cache: Clone {
    fn storage_open<'life0, 'async_trait>(
        &'life0 self,
        cache_name: String
    ) -> Pin<Box<dyn Future<Output = Result<i64, AnyError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; fn storage_has<'life0, 'async_trait>(
        &'life0 self,
        cache_name: String
    ) -> Pin<Box<dyn Future<Output = Result<bool, AnyError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; fn storage_delete<'life0, 'async_trait>(
        &'life0 self,
        cache_name: String
    ) -> Pin<Box<dyn Future<Output = Result<bool, AnyError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; fn put<'life0, 'async_trait>(
        &'life0 self,
        request_response: CachePutRequest
    ) -> Pin<Box<dyn Future<Output = Result<Option<Rc<dyn Resource>>, AnyError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; fn match<'life0, 'async_trait>(
        &'life0 self,
        request: CacheMatchRequest
    ) -> Pin<Box<dyn Future<Output = Result<Option<(CacheMatchResponseMeta, Option<Rc<dyn Resource>>)>, AnyError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; fn delete<'life0, 'async_trait>(
        &'life0 self,
        request: CacheDeleteRequest
    ) -> Pin<Box<dyn Future<Output = Result<bool, AnyError>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }

Required Methods

Implementors