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.
Sourcepub fn new_with_tls(
redis_url: &str,
ttl_seconds: NonZeroU64,
tls_config: RedisTlsConfig,
) -> Result<Self, ReconstructionCacheError>
pub fn new_with_tls( redis_url: &str, ttl_seconds: NonZeroU64, tls_config: RedisTlsConfig, ) -> Result<Self, ReconstructionCacheError>
Creates a Redis-backed reconstruction cache adapter with TLS or mTLS material.
The Redis URL must use the rediss:// scheme whenever TLS material is
supplied. An empty config still permits rediss:// URLs that use the
platform trust store.
§Errors
Returns ReconstructionCacheError when the URL or TLS material is 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 Freeze for RedisReconstructionCache
impl RefUnwindSafe for RedisReconstructionCache
impl Send for RedisReconstructionCache
impl Sync for RedisReconstructionCache
impl Unpin for RedisReconstructionCache
impl UnsafeUnpin for RedisReconstructionCache
impl UnwindSafe 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