Skip to main content

compute_auto_disk_budget_bytes

Function compute_auto_disk_budget_bytes 

Source
pub const fn compute_auto_disk_budget_bytes(
    available_bytes: u64,
    current_cache_bytes: u64,
) -> u64
Expand description

Compute an auto-sized disk budget, in bytes.

available_bytes is free space on the filesystem holding the slot directory; current_cache_bytes is the cache’s own current footprint (already-cached files count as “available” for the cache to keep using, since evicting them doesn’t free space for anything else). The budget is a quarter of that combined figure — safe headroom for the rest of the disk, expanding automatically as free space changes.