Skip to main content

Module slot_eviction

Module slot_eviction 

Source
Expand description

Byte-budget selection for on-disk KV slot cache eviction.

Pure decision logic, no IO: given the current set of cached slot files and a byte budget, decide which files to delete. The disk-scanning and deletion itself lives in gglib-proxy (slot_eviction.rs), which stats the slot directory and hands the results here.

Structs§

SlotFileMeta
Metadata for one on-disk slot file, gathered by the IO layer.

Constants§

DISK_BUDGET_FRACTION_DIVISOR
Divisor applied to (free disk space + cache footprint) for the auto budget.

Functions§

compute_auto_disk_budget_bytes
Compute an auto-sized disk budget, in bytes.
select_evictions
Given all cached slot files and a byte budget, return the paths to delete.