Expand description
Global memory cache functions used by the #[memoize] macro.
The process-wide store is bounded: at most 4,096 entries and 32 MiB of key plus value bytes, each entry at most 256 KiB and one hour old. Oversized entries are not cached, and the oldest entries are evicted when a bound would be exceeded. When an insertion would exceed a bound, expired entries are dropped first and then the oldest insertions are evicted until the store is back at three quarters of both limits, which amortizes eviction work. A memoized call whose entry is not cached simply runs uncached.