pub struct AdaptiveTtlConfig {
pub rules: Vec<TtlRule>,
pub default_ttl: Duration,
}Expand description
Configuration for adaptive negative cache TTLs.
Different path patterns have different rates of change. Build artifacts and dependency directories are relatively stable during a work session, while source files change frequently. This allows the negative cache to use longer TTLs for stable paths and shorter TTLs for volatile ones.
Fields§
§rules: Vec<TtlRule>Rules evaluated in order; first match wins.
default_ttl: DurationDefault TTL for paths matching no rule.
Implementations§
Trait Implementations§
Source§impl Clone for AdaptiveTtlConfig
impl Clone for AdaptiveTtlConfig
Source§fn clone(&self) -> AdaptiveTtlConfig
fn clone(&self) -> AdaptiveTtlConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AdaptiveTtlConfig
impl Debug for AdaptiveTtlConfig
Auto Trait Implementations§
impl Freeze for AdaptiveTtlConfig
impl RefUnwindSafe for AdaptiveTtlConfig
impl Send for AdaptiveTtlConfig
impl Sync for AdaptiveTtlConfig
impl Unpin for AdaptiveTtlConfig
impl UnsafeUnpin for AdaptiveTtlConfig
impl UnwindSafe for AdaptiveTtlConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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