CacheKit Docs

High-performance cache policies and supporting data structures.

View the Project on GitHub OxidizeLabs/cachekit

NRU operational spec

Spec maturity: stub

Executable oracle: tests/abstract_models/exact/nru.rs (NruModel) until an independent reference/ model exists.

Not Recently Used: track reference bit per key in insertion order; evict first unreferenced key (swap-remove).

State

Variable Type Meaning
keys Seq<K> Insertion order (swap-remove on eviction)
referenced Map<K, bool> Reference bit per key
capacity usize Maximum resident count

Init

Observables

Observable Definition
resident Keys in keys
hit MustHit / MustMiss

Operations

Insert(k) (new key)

Get(k) / Peek(k)

Remove(k)

Harness notes

References