pub struct L1ProcessCache { /* private fields */ }Expand description
Process-local cache backed by a concurrent map and a fixed TTL.
Implementations§
Source§impl L1ProcessCache
impl L1ProcessCache
Sourcepub fn get(&self, key: &CacheKey) -> Option<DeliveryEntryV2>
pub fn get(&self, key: &CacheKey) -> Option<DeliveryEntryV2>
Returns a live entry and drops expired local entries.
Sourcepub fn insert(&self, entry: DeliveryEntryV2)
pub fn insert(&self, entry: DeliveryEntryV2)
Inserts or replaces an entry using this tier’s TTL.
Sourcepub fn remove(&self, key: &CacheKey) -> Option<DeliveryEntryV2>
pub fn remove(&self, key: &CacheKey) -> Option<DeliveryEntryV2>
Removes an entry by key.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for L1ProcessCache
impl Freeze for L1ProcessCache
impl Send for L1ProcessCache
impl Sync for L1ProcessCache
impl Unpin for L1ProcessCache
impl UnsafeUnpin for L1ProcessCache
impl UnwindSafe for L1ProcessCache
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more