Available on crate feature
mem-cache only.Expand description
It provides in-memory files cache functionality with expiration policy support 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.
Structs§
- MemCache
Opts - It defines the in-memory files cache options.
Constants§
- DEFAULT_
CAPACITY - Default capacity (number of entries).
- DEFAULT_
MAX_ FILE_ SIZE - Default maximum file size in KiB (8 MiB = 8192 KiB).
- DEFAULT_
TTI - Default time-to-idle in seconds (5 minutes).
- DEFAULT_
TTL - Default time-to-live in seconds (30 minutes).
Functions§
- init
- Initialize the in-memory cache store from handler options.