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
) -> 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
) -> Option<O>
&mut self,
key: K
) -> Option<O>
fn remove<K: ToString, O: Cacheable>(&mut self, key: K) -> Result<()>
Implementors
impl CacheAccess for MemoryCacheimpl CacheAccess for RedisCache