pub struct EvictionParams {
pub cache_size_mb: u64,
pub disk_headroom_mb: u64,
pub high_water_pct: u64,
pub target_pct: u64,
pub per_sweep_budget: u64,
pub tick: Duration,
}Expand description
Resolved driver parameters. Every field is range-checked at config
resolution (resolve_cache_into): high_water_pct ∈ [60, 95],
target_pct ∈ [40, 90] and target_pct <= high_water_pct - 5 (the
structural hysteresis gap), per_sweep_budget ∈ [1, 256],
tick ∈ [1s, 60s]. The type itself carries no invariant — it is a wiring
DTO with a single production construction site.
Fields§
§cache_size_mb: u64Configured cache size in MiB; the upper bound on the ceiling (the disk clamp can only lower it, never raise it).
disk_headroom_mb: u64Free disk in MiB the driver keeps unused on the cache_dir volume by
any process (#1930). Each tick the effective ceiling is capped so the
cache cannot grow into the last disk_headroom_mb of free space; below
it, the driver evicts to claw disk back. 0 opts out of the disk clamp
(only cache_size_mb binds).
high_water_pct: u64Crossing this percentage of the effective ceiling starts a sweep.
target_pct: u64A sweep runs until usage falls to this percentage. The gap to
high_water_pct is the hysteresis that stops it flapping.
per_sweep_budget: u64Maximum blobs released in one sweep, so a sweep cannot monopolize the store.
tick: DurationHow often the driver re-reads usage.
Trait Implementations§
Source§impl Clone for EvictionParams
impl Clone for EvictionParams
impl Copy for EvictionParams
Auto Trait Implementations§
impl Freeze for EvictionParams
impl RefUnwindSafe for EvictionParams
impl Send for EvictionParams
impl Sync for EvictionParams
impl Unpin for EvictionParams
impl UnsafeUnpin for EvictionParams
impl UnwindSafe for EvictionParams
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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> ⓘ
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> ⓘ
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request