pub enum TtlPolicy {
Default,
Fixed(Duration),
Infinite,
PerType(fn(&str) -> Duration),
}Expand description
TTL (Time-to-Live) policy for cache entries.
Variants§
Default
Use backend’s default TTL
Fixed(Duration)
Fixed duration for all entries
Infinite
No TTL (entries live forever)
PerType(fn(&str) -> Duration)
Custom per-type policy
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TtlPolicy
impl RefUnwindSafe for TtlPolicy
impl Send for TtlPolicy
impl Sync for TtlPolicy
impl Unpin for TtlPolicy
impl UnwindSafe for TtlPolicy
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