Trait mouscache::CacheAccess
[−]
[src]
pub trait CacheAccess { fn insert<K: ToString, O: Cacheable + Clone + 'static>(
&mut self,
key: K,
obj: O
) -> Result<()>; fn get<K: ToString, O: Cacheable + Clone + 'static>(
&mut self,
key: K
) -> Result<Option<O>>; fn remove<K: ToString, O: Cacheable>(&mut self, key: K) -> Result<()>; }
Required Methods
fn insert<K: ToString, O: Cacheable + Clone + 'static>(
&mut self,
key: K,
obj: O
) -> Result<()>
&mut self,
key: K,
obj: O
) -> Result<()>
fn get<K: ToString, O: Cacheable + Clone + 'static>(
&mut self,
key: K
) -> Result<Option<O>>
&mut self,
key: K
) -> Result<Option<O>>
fn remove<K: ToString, O: Cacheable>(&mut self, key: K) -> Result<()>
Implementors
impl CacheAccess for MemoryCache
impl CacheAccess for RedisCache