CacheEvent
Something a SemanticCache (or its CacheStore) did, delivered to a CacheListener the moment it happens.
The counters in CacheStats tell you the totals; events tell you the stream. A dashboard that wants a hit-rate gauge reads CacheStats; a metrics exporter that wants a per-lookup latency histogram, a log line per decision, or a live tap on evictions subscribes to these instead of polling. Emitting is opt-in — a cache with no listeners builds no events and measures no timings, so the default hot path is unchanged.
Every event names the scope it happened in, so a subscriber can tag or filter by scope without threading it separately.
Inheritors
Types
An entry left the store, either evicted for capacity/memory or dropped past its TTL.
A lookup that was served from the cache.
A lookup that could not be served, with the same reason CacheLookup.Miss reports.