pub struct TtlConfig {
pub sample_size: usize,
pub expiry_threshold: f32,
pub max_iterations: usize,
pub max_time_per_run: Duration,
pub sleep_interval: Duration,
pub enabled: bool,
}Expand description
Configuration for TTL cleaner background thread
Fields§
§sample_size: usizeNumber of keys to sample per batch
expiry_threshold: f32Continue sampling if expiry rate exceeds this threshold (0.0-1.0)
max_iterations: usizeMaximum iterations per cleaning run
max_time_per_run: DurationMaximum time to spend per cleaning run
sleep_interval: DurationSleep interval between cleaning runs
enabled: boolWhether TTL cleaner is enabled
Implementations§
Source§impl TtlConfig
impl TtlConfig
Sourcepub fn default_persistent() -> Self
pub fn default_persistent() -> Self
Create a default configuration for persistent stores
Sourcepub fn default_memory() -> Self
pub fn default_memory() -> Self
Create a default configuration for memory-only stores
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TtlConfig
impl RefUnwindSafe for TtlConfig
impl Send for TtlConfig
impl Sync for TtlConfig
impl Unpin for TtlConfig
impl UnwindSafe for TtlConfig
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