pub struct NegativeCacheConfig {
pub max_entries: usize,
pub timeout: Duration,
}Expand description
Configuration for the negative cache.
Negative caching stores “file not found” results to avoid repeated
filesystem lookups for non-existent files. This is particularly effective
for directories like node_modules and .git where many lookups fail.
Fields§
§max_entries: usizeMaximum number of entries in the cache. When exceeded, expired entries are evicted. Default: 10000
timeout: DurationTime-to-live for cache entries. Entries older than this are considered stale. Default: 1 second
Implementations§
Trait Implementations§
Source§impl Clone for NegativeCacheConfig
impl Clone for NegativeCacheConfig
Source§fn clone(&self) -> NegativeCacheConfig
fn clone(&self) -> NegativeCacheConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 NegativeCacheConfig
impl Debug for NegativeCacheConfig
Auto Trait Implementations§
impl Freeze for NegativeCacheConfig
impl RefUnwindSafe for NegativeCacheConfig
impl Send for NegativeCacheConfig
impl Sync for NegativeCacheConfig
impl Unpin for NegativeCacheConfig
impl UnsafeUnpin for NegativeCacheConfig
impl UnwindSafe for NegativeCacheConfig
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