Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: experimental in-memory files cache with eviction policy support (…
…static-web-server#328) Via a new advanced configuration entry. The feature also supports expiration policies such as Time To Live (TTL) and Time To Idle (TTI). Admission to a cache is controlled by the Least Frequently Used (LFU) policy and the eviction from a cache is controlled by the Least Recently Used (LRU) policy. Example: ```toml [general] [advanced] [advanced.memory-cache] # Maximum capacity entries of the memory cache-store. Default 256 capacity = 256 # Time to live in seconds of a cached file entry. Default 1h ttl = 3600 # Time to idle in seconds of a cached file entry. Default 5min tti = 300 # Maximum size in bytes for a file entry to be cached. Default 8MB max-file-size = 8192 ``` Note that this feature requires Rust 1.76.0 or newer. This feature is **experimental**. However, when stabilized then a cargo feature will be available as well as a proper documentation page.
- Loading branch information