Skip to main content

Module cache

Module cache 

Source
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§

MemCacheOpts
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.