pub struct CacheConfig {
pub serve_lookup_from_cache: bool,
pub file_ttl: Duration,
pub dir_ttl: Duration,
pub use_negative_cache: bool,
pub negative_cache_ttl: Duration,
pub negative_cache_size: usize,
}Fields§
§serve_lookup_from_cache: boolShould the file system serve lookup requests including open from cached entries, or instead check S3 even when a valid cached entry may be available?
Even when disabled, some operations such as getattr are allowed to be served from cache
with a short TTL since Linux filesystems behave badly when the TTL is zero.
For example, results from readdir would expire immediately, and the kernel would
immediately getattr every entry returned from readdir.
file_ttl: DurationHow long the kernel will cache metadata for files
dir_ttl: DurationHow long the kernel will cache metadata for directories
use_negative_cache: boolShould the file system cache negative lookups?
negative_cache_ttl: DurationHow long the file system will cache negative entries
negative_cache_size: usizeMaximum number of negative entries to cache.
Implementations§
Source§impl CacheConfig
impl CacheConfig
Sourcepub fn new(metadata_ttl: TimeToLive) -> Self
pub fn new(metadata_ttl: TimeToLive) -> Self
Construct cache configuration settings from metadata TTL.
pub fn with_negative_metadata_ttl( self, negative_metadata_ttl: TimeToLive, ) -> Self
Trait Implementations§
Source§impl Clone for CacheConfig
impl Clone for CacheConfig
Source§fn clone(&self) -> CacheConfig
fn clone(&self) -> CacheConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more