Skip to main content

Module cache_stats

Module cache_stats 

Source
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ยง

CacheStats
Monotonic counters describing how a cache behaves.
CacheStatsSnapshot
Immutable view over a CacheStats counter set.