Skip to content

v0.5.0 — direct cache hit/miss metric

Choose a tag to compare

@bcrisp4 bcrisp4 released this 24 May 07:27
· 1 commit to main since this release

Highlights

  • New metric: bns_cache_lookups_total{result="hit"|"miss"} — direct cache effectiveness signal emitted by cachestage on every single-question lookup. Hit-rate is now a clean Prometheus query:
    rate(bns_cache_lookups_total{result="hit"}[5m])
    / rate(bns_cache_lookups_total[5m])
    
    Replaces the indirect derivation from bns_upstream_queries_total / bns_queries_total, which was noisy under coalesced piggybacks and upstream errors.
  • Help-text fix: bns_cache_evictions_total now correctly documents both eviction paths (LRU pressure on Store and lazy TTL expiry on Get).

Internal

  • cachestage.New gained a *metrics.Metrics parameter (nil-safe, matching the coalesce stage precedent). Multi-question requests bypass the cache and the counter — they are not lookups.
  • CLAUDE.md compressed + improver pass.

Changelog

3bb1663 metrics: add bns_cache_lookups_total{result=hit|miss}
9971540 docs: /caveman:compress pass over CLAUDE.md
f1b349e docs: CLAUDE.md improver pass — v0.4.0 release, make build-stress, compress DoH gotchas
b325bd1 docs: 3 learnings from DoH session (test helpers, TLS h2, Pack-error)
b30dd43 metrics: clarify cache eviction help text covers TTL expiry

Container image

ghcr.io/bcrisp4/bns:0.5.0 (multi-arch linux/amd64 + linux/arm64) — published automatically by CI on tag push.