logo memory /cache v1.1.1
FIG-001/ OBSERVABILITY

watch cache hooks.

Measure hit, miss, set, delete, and evict events as live traffic moves through a MemoryCache.

  • The cache wires hooks for onHit, onMiss, onSet, onDelete, and onEvict.
  • The hit rate is calculated from reads only: hits / (hits + misses).
  • burst runs ten mixed operations so the event stream can show hits, misses, writes, deletes, and evictions together.
  • reset clears the counters and creates a fresh cache with maxSize: 5 and a 30s TTL.
↩ all examples
pattern · live metrics mode · live running source
requests · 0
hit rate · 0.0%
size · 0/5
ttl · 30s
last · seeded
hit rate 0.0%

0 hits / 0 reads

hits 0
misses 0
sets 0
deletes 0
evictions 0
ops 0
event
key
age
no operations

run traffic to populate the hook log

hooks · set hit miss delete evict
capacity · 5
entries · 0
events · 0
mode · live
category · observability
sheet · sheet 01 / 01
⟳ to re-run