pub struct DashMapCache { /* private fields */ }Implementations§
Trait Implementations§
Source§impl CacheBackend for DashMapCache
Implement CacheBackend trait for DashMapCache
impl CacheBackend for DashMapCache
Implement CacheBackend trait for DashMapCache
Source§fn get<'a>(&'a self, key: &'a str) -> BoxFuture<'a, Option<Bytes>>
fn get<'a>(&'a self, key: &'a str) -> BoxFuture<'a, Option<Bytes>>
Get value from cache by key Read more
Source§fn set_with_ttl<'a>(
&'a self,
key: &'a str,
value: Bytes,
ttl: Duration,
) -> BoxFuture<'a, CacheResult<()>>
fn set_with_ttl<'a>( &'a self, key: &'a str, value: Bytes, ttl: Duration, ) -> BoxFuture<'a, CacheResult<()>>
Set value in cache with time-to-live Read more
Source§fn remove<'a>(&'a self, key: &'a str) -> BoxFuture<'a, CacheResult<()>>
fn remove<'a>(&'a self, key: &'a str) -> BoxFuture<'a, CacheResult<()>>
Remove value from cache Read more
Source§fn set<'a>(
&'a self,
key: &'a str,
value: Bytes,
) -> BoxFuture<'a, CacheResult<()>>
fn set<'a>( &'a self, key: &'a str, value: Bytes, ) -> BoxFuture<'a, CacheResult<()>>
Set value in cache with default TTL (5 minutes)
Source§fn remove_pattern<'a>(
&'a self,
_pattern: &'a str,
) -> BoxFuture<'a, CacheResult<()>>
fn remove_pattern<'a>( &'a self, _pattern: &'a str, ) -> BoxFuture<'a, CacheResult<()>>
Remove keys matching a pattern Read more
Source§impl Default for DashMapCache
impl Default for DashMapCache
Source§impl L2CacheBackend for DashMapCache
impl L2CacheBackend for DashMapCache
Auto Trait Implementations§
impl Freeze for DashMapCache
impl !RefUnwindSafe for DashMapCache
impl Send for DashMapCache
impl Sync for DashMapCache
impl Unpin for DashMapCache
impl UnsafeUnpin for DashMapCache
impl !UnwindSafe for DashMapCache
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more