Expand description
Hybrid memory + disk cache backend.
Opt-in alternative to nvme_cache::NvmeHotCache. Selected at runtime via
WMBT_KV_PUFFER_BACKEND=hybrid. The cache manages both memory and on-disk
tiers internally:
- S3-FIFO eviction in memory
- Direct I/O on Linux to bypass the OS page cache
io_uringasync backend (when available) for the disk tier- Block-aligned device layout
sync get fast path probes the memory tier directly to avoid a
block_on round trip on warm hits, which is where the production
perf wins live. Foyer hybrid cache: in-process RAM (L0) + on-disk
SSD (L1).
Structs§
- Foyer
Cache Config - Tuning knobs for the hybrid cache.
- Foyer
Hybrid Cache - Hybrid memory + disk cache backed by foyer.
Enums§
- Foyer
Cache Error - Cache operation failures surfaced to callers.
- Foyer
HitTier - Which foyer tier served a hit. Returned alongside the payload by
FoyerCache::get_with_tierso callers can attribute latency to the right tier in observability traces.
Functions§
- backend_
selected - Returns true when
WMBT_KV_PUFFER_BACKEND=hybridin the process environment. - backend_
selected_ with - Returns true when the supplied lookup yields
hybridforWMBT_KV_PUFFER_BACKEND. - config_
from_ env - Read
FoyerCacheConfigfrom process environment variables. - config_
from_ lookup - Read
FoyerCacheConfigfrom a key/value lookup. Tested in isolation from process env so callers can drive deterministic unit tests without mutating global state.