pub struct CacheConfig { /* private fields */ }
Expand description
Global configuration for how the cache is managed
Implementations§
Source§impl CacheConfig
impl CacheConfig
Sourcepub fn worker_event_queue_size(&self) -> u64
pub fn worker_event_queue_size(&self) -> u64
Returns $setting
.
Panics if the cache is disabled.
Sourcepub fn baseline_compression_level(&self) -> i32
pub fn baseline_compression_level(&self) -> i32
Returns $setting
.
Panics if the cache is disabled.
Sourcepub fn optimized_compression_level(&self) -> i32
pub fn optimized_compression_level(&self) -> i32
Returns $setting
.
Panics if the cache is disabled.
Sourcepub fn optimized_compression_usage_counter_threshold(&self) -> u64
pub fn optimized_compression_usage_counter_threshold(&self) -> u64
Returns $setting
.
Panics if the cache is disabled.
Sourcepub fn cleanup_interval(&self) -> Duration
pub fn cleanup_interval(&self) -> Duration
Returns $setting
.
Panics if the cache is disabled.
Sourcepub fn optimizing_compression_task_timeout(&self) -> Duration
pub fn optimizing_compression_task_timeout(&self) -> Duration
Returns $setting
.
Panics if the cache is disabled.
Sourcepub fn allowed_clock_drift_for_files_from_future(&self) -> Duration
pub fn allowed_clock_drift_for_files_from_future(&self) -> Duration
Returns $setting
.
Panics if the cache is disabled.
Sourcepub fn file_count_soft_limit(&self) -> u64
pub fn file_count_soft_limit(&self) -> u64
Returns $setting
.
Panics if the cache is disabled.
Sourcepub fn files_total_size_soft_limit(&self) -> u64
pub fn files_total_size_soft_limit(&self) -> u64
Returns $setting
.
Panics if the cache is disabled.
Sourcepub fn file_count_limit_percent_if_deleting(&self) -> u8
pub fn file_count_limit_percent_if_deleting(&self) -> u8
Returns $setting
.
Panics if the cache is disabled.
Sourcepub fn files_total_size_limit_percent_if_deleting(&self) -> u8
pub fn files_total_size_limit_percent_if_deleting(&self) -> u8
Returns $setting
.
Panics if the cache is disabled.
Sourcepub fn directory(&self) -> &PathBuf
pub fn directory(&self) -> &PathBuf
Returns path to the cache directory.
Panics if the cache is disabled.
Sourcepub fn new_cache_disabled() -> Self
pub fn new_cache_disabled() -> Self
Creates a new set of configuration which represents a disabled cache
Sourcepub fn from_file(config_file: Option<&Path>) -> Result<Self>
pub fn from_file(config_file: Option<&Path>) -> Result<Self>
Parses cache configuration from the file specified
Sourcepub fn cache_hits(&self) -> usize
pub fn cache_hits(&self) -> usize
Returns the number of cache hits seen so far
Sourcepub fn cache_misses(&self) -> usize
pub fn cache_misses(&self) -> usize
Returns the number of cache misses seen so far
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 moreSource§impl Debug for CacheConfig
impl Debug for CacheConfig
Source§impl<'de> Deserialize<'de> for CacheConfig
impl<'de> Deserialize<'de> for CacheConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for CacheConfig
impl RefUnwindSafe for CacheConfig
impl Send for CacheConfig
impl Sync for CacheConfig
impl Unpin for CacheConfig
impl UnwindSafe for CacheConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)