Skip to main content

Module cache

Module cache 

Source
Expand description

Byte-accounted logical caches.

A bounded, LRU-evicting key/value cache whose resident bytes are charged to the shared ByteBudget tree. Unlike an unbounded HashMap, growth is visible to the resource governor and a cache can never exceed its budget: insert evicts least-recently-used entries until the new entry fits, and skips caching a single entry larger than the whole budget.

This is the shared mechanism behind the decoded-record, adjacency, and property-dictionary caches; callers supply each entry’s byte weight so the accounting matches what they actually retain.

Structs§

CacheStats
Point-in-time cache occupancy and hit-rate counters.
LogicalCache
A bounded logical cache charged to a ByteBudget.