Skip to main content

Module cache_policy

Module cache_policy 

Source
Expand description

Adaptive cache policy driven by ResourceGuard memory pressure. Adaptive cache policy driven by llmosafe’s ResourceGuard pressure signal.

Turns ResourceGuard from a binary safety gate into a continuous cache manager. Reads ResourceGuard::pressure() (0–100) and produces CacheDirectives that tell cache layers how aggressively to cache, evict, or pin pages.

Structs§

AdaptiveCachePolicy
Read-only policy object that reads ResourceGuard::pressure() and produces cache directives. Does not own any cache — it only tells other code what to do.
CacheDirective
Directive produced by AdaptiveCachePolicy::directive.

Enums§

PressureZone
Pressure zone classification based on memory pressure percentage.