pub struct TinyLfuEviction { /* private fields */ }Expand description
Ranks eviction candidates least-frequent-first, reading frequency from a
shared estimator; ties break oldest-access-first (LRFU), then largest
first, so blobs sharing the open-time recency seed release in the order that
reaches the target in the fewest releases. Also owns the
probation lifecycle at sweep time: promotes probation members whose
buffered frequency has reached promotion_threshold, and caps probation’s
footprint to probation_target_pct of cache_bytes by evicting the
least-frequent non-promoted probation members first.
Implementations§
Trait Implementations§
Source§impl Debug for TinyLfuEviction
impl Debug for TinyLfuEviction
Source§impl EvictionPolicy for TinyLfuEviction
impl EvictionPolicy for TinyLfuEviction
Source§fn plan(&self, ctx: &EvictionContext<'_>) -> EvictionPlan
fn plan(&self, ctx: &EvictionContext<'_>) -> EvictionPlan
The one sweep-time decision: what leaves, what graduates. A policy that
ranks by frequency reads the shared
FrequencyEstimator directly — the
engine feeds that estimator on every serve. candidates is already
stripped of pins and probe-holds by the engine; a deny-listed hash stays
a candidate even when pinned (deny wins over pin).Auto Trait Implementations§
impl !RefUnwindSafe for TinyLfuEviction
impl !UnwindSafe for TinyLfuEviction
impl Freeze for TinyLfuEviction
impl Send for TinyLfuEviction
impl Sync for TinyLfuEviction
impl Unpin for TinyLfuEviction
impl UnsafeUnpin for TinyLfuEviction
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
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 moreCreates a shared type from an unshared type.