Skip to main content

classify_cache_ram

Function classify_cache_ram 

Source
pub const fn classify_cache_ram(
    cache_ram_mb: Option<u64>,
    was_explicit: bool,
) -> CacheRamHealth
Expand description

Classify a resolved --cache-ram budget.

§Arguments

  • cache_ram_mb — the resolved budget, or None when no flag is emitted.
  • was_explicit — whether the value came from the user rather than auto-sizing. Only consulted to disambiguate 0; a small-but-nonzero budget is reported as CacheRamHealth::Low either way, because the consequence (switches re-prefill) is the same regardless of who chose it.