pub struct RedisReconstructionCache { /* private fields */ }Expand description
Redis-backed reconstruction cache adapter.
Implementations§
Source§impl RedisReconstructionCache
impl RedisReconstructionCache
Sourcepub fn new(
redis_url: &str,
ttl_seconds: NonZeroU64,
) -> Result<Self, ReconstructionCacheError>
pub fn new( redis_url: &str, ttl_seconds: NonZeroU64, ) -> Result<Self, ReconstructionCacheError>
Creates a Redis-backed reconstruction cache adapter.
§Errors
Returns ReconstructionCacheError when the URL is empty or invalid.
Trait Implementations§
Source§impl AsyncReconstructionCache for RedisReconstructionCache
impl AsyncReconstructionCache for RedisReconstructionCache
Source§fn ready(&self) -> ReconstructionCacheFuture<'_, ()>
fn ready(&self) -> ReconstructionCacheFuture<'_, ()>
Verifies that the adapter is configured correctly and can serve requests.
Source§fn get<'operation>(
&'operation self,
key: &'operation ReconstructionCacheKey,
) -> ReconstructionCacheFuture<'operation, Option<Vec<u8>>>
fn get<'operation>( &'operation self, key: &'operation ReconstructionCacheKey, ) -> ReconstructionCacheFuture<'operation, Option<Vec<u8>>>
Loads one cached reconstruction payload.
Source§fn put<'operation>(
&'operation self,
key: &'operation ReconstructionCacheKey,
payload: &'operation [u8],
) -> ReconstructionCacheFuture<'operation, ()>
fn put<'operation>( &'operation self, key: &'operation ReconstructionCacheKey, payload: &'operation [u8], ) -> ReconstructionCacheFuture<'operation, ()>
Stores one reconstruction payload.
Source§fn delete<'operation>(
&'operation self,
key: &'operation ReconstructionCacheKey,
) -> ReconstructionCacheFuture<'operation, bool>
fn delete<'operation>( &'operation self, key: &'operation ReconstructionCacheKey, ) -> ReconstructionCacheFuture<'operation, bool>
Deletes one cached reconstruction payload.
Source§impl Clone for RedisReconstructionCache
impl Clone for RedisReconstructionCache
Auto Trait Implementations§
impl !RefUnwindSafe for RedisReconstructionCache
impl !UnwindSafe for RedisReconstructionCache
impl Freeze for RedisReconstructionCache
impl Send for RedisReconstructionCache
impl Sync for RedisReconstructionCache
impl Unpin for RedisReconstructionCache
impl UnsafeUnpin for RedisReconstructionCache
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