askill
cache-observability

cache-observabilitySafety --Repository

Track cache hit rates, latency, and detect cache-related issues

0 stars
1.2k downloads
Updated 12/26/2025

Package Files

Loading files...
SKILL.md

Cache Observability

Cache is performance-critical. Track hit rate, latency, and evictions.

Key Metrics

MetricTypeDescription
cache.hitsCounterSuccessful reads
cache.missesCounterReads that missed
cache.gets.durationHistogramGET latency
cache.evictionsCounterKeys evicted
cache.memory.usedGaugeMemory consumption

Span Attributes

AttributeExampleRequired
cache.systemredis, memcachedYes
cache.operationGET, SETYes
cache.hittrue/falseYes
cache.key_prefixuser:*Recommended (not full key!)

Hit Rate

hit_rate = cache.hits / (cache.hits + cache.misses)
  • Good: >90%
  • Concerning: <80% → Check TTL, warming strategy

Issues to Detect

IssueDetectionFix
Low hit rate<80%Tune TTL, warm cache
Cache stampedeMany misses for same keyDistributed locks
High latencyp99 >10msCheck network, value size
Memory pressurememory >90% of maxEviction policy, sizing

Cache Wrapper Pattern

Before GET: Start timer
After GET:  Record duration, increment hits or misses, set cache.hit on span

Anti-Patterns

  • Full keys in metrics → High cardinality, use prefix only
  • No eviction monitoring → Can't detect memory pressure
  • Ignoring serialization time → Track total time including marshal

References

  • references/platforms/{platform}/cache.md

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

AI review pending.

Metadata

Licenseunknown
Version-
Updated12/26/2025
Publishernexus-labs-automation

Tags

observability