Expand description
Hit/miss counters shared by the engine and platform caches.
Every cache in the engine (CSS selector match results) and in the platform
layer (HTTP responses, glyph atlas, glyph bearings, text layouts, text
shaping) owns a CacheStats counter set so hit rates and eviction
pressure can be observed at runtime and measured in benches/cache_bench.rs.
This module lives in the engine layer so engine-side caches can count hits without reaching down into the platform; the platform re-exports it under its original path.
Structsยง
- Cache
Stats - Monotonic counters describing how a cache behaves.
- Cache
Stats Snapshot - Immutable view over a
CacheStatscounter set.