CacheKit Docs

High-performance cache policies and supporting data structures.

View the Project on GitHub OxidizeLabs/cachekit

Lazy Heap Index (Heap + Authoritative Map)

What It Is

A “lazy heap” pattern keeps:

On pop(), you discard stale heap entries until the top matches the authoritative score.

Used for:

Core Types

Operations

Complexity

Bounding Stale Growth

If heap.len() grows much larger than scores.len(), rebuild:

This keeps memory bounded and improves worst-case pop latency.