CacheKit Docs

High-performance cache policies and supporting data structures.

View the Project on GitHub OxidizeLabs/cachekit

Clock operational spec

Spec maturity: stub

Executable oracle: tests/abstract_models/exact/clock.rs (ClockModel) — mirrors ClockRing until an independent reference/ model exists.

Clock (second-chance): circular buffer with reference bits; evict first unreferenced slot on the clock hand.

State

Variable Type Meaning
ring ClockRing<K,V> Circular slots with reference bits
hand index Clock sweep position

Init

Observables

Observable Definition
resident Keys present in ring slots
peek_victim First unreferenced slot from hand (second-chance sweep)
hit MustHit / MustMiss

Operations

Insert(k)

Get(k) / Peek(k)

EvictOne

Harness notes

References