pub struct Cache { }
Available on crate feature cache
only.
Global configuration for how the cache is managed
Source§ SourceBuilds a Cache
from the configuration and spawns the cache worker.
If you want to load the cache configuration from a file, use CacheConfig::from_file
. You can call CacheConfig::new
for the default configuration.
Returns an error if the configuration is invalid.
SourceLoads cache configuration specified at path
.
This method will read the file specified by path
on the filesystem and attempt to load cache configuration from it. This method can also fail due to I/O errors, misconfiguration, syntax errors, etc. For expected syntax in the configuration file see the documentation online.
Passing in None
loads cache configuration from the system default path. This is located, for example, on Unix at $HOME/.config/wasmtime/config.toml
and is typically created with the wasmtime config new
command.
This method can fail due to any error that happens when loading the file pointed to by path
and attempting to load the cache configuration.
Returns worker_event_queue_size
.
Returns baseline_compression_level
.
Returns optimized_compression_level
.
Returns optimized_compression_usage_counter_threshold
.
Returns cleanup_interval
.
Returns optimizing_compression_task_timeout
.
Returns allowed_clock_drift_for_files_from_future
.
Returns file_count_soft_limit
.
Returns files_total_size_soft_limit
.
Returns file_count_limit_percent_if_deleting
.
Returns files_total_size_limit_percent_if_deleting
.
Returns path to the cache directory.
SourceReturns the number of cache hits seen so far
SourceReturns the number of cache misses seen so far
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4