pub struct RedisCache { /* private fields */ }Expand description
Redis distributed cache with ConnectionManager for automatic reconnection
Implementations§
Source§impl RedisCache
impl RedisCache
Trait Implementations§
Source§impl CacheBackend for RedisCache
Implement CacheBackend trait for RedisCache
impl CacheBackend for RedisCache
Implement CacheBackend trait for RedisCache
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, Result<()>>
fn set_with_ttl<'a>( &'a self, key: &'a str, value: Bytes, ttl: Duration, ) -> BoxFuture<'a, Result<()>>
Set value in cache with time-to-live Read more
Source§fn remove<'a>(&'a self, key: &'a str) -> BoxFuture<'a, Result<()>>
fn remove<'a>(&'a self, key: &'a str) -> BoxFuture<'a, Result<()>>
Remove value from cache Read more
Source§impl L2CacheBackend for RedisCache
impl L2CacheBackend for RedisCache
Auto Trait Implementations§
impl Freeze for RedisCache
impl !RefUnwindSafe for RedisCache
impl Send for RedisCache
impl Sync for RedisCache
impl Unpin for RedisCache
impl UnsafeUnpin for RedisCache
impl !UnwindSafe for RedisCache
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