CacheKit Docs

High-performance cache policies and supporting data structures.

View the Project on GitHub OxidizeLabs/cachekit

LHD (Learning Hit Density)

Goal

Maximize value per byte by using a learned estimate of hit probability over remaining lifetime, especially when object sizes vary substantially.

Core Idea

LHD estimates each object’s future hit density (roughly expected future hits per byte over a horizon) from observed reuse behavior. Eviction prefers entries with the lowest estimated hit density.

Compared to simple size-aware scoring, LHD adapts estimates from workload data instead of relying on fixed formulas.

Core Data Structures (Typical)

Complexity & Overhead

Notes For CacheKit

References