Skip to content

PATTERN Cited by 1 source

Negative-lookup cache

Pattern

In miss-heavy lookup workloads (where most queries return "nothing found"), cache the negative result ("no subscriptions exist for this event") behind a short TTL. Applied selectively to event types where the no-match rate is consistently high, so freshness for general-purpose event types is unaffected.

Why the miss side is the win

Most cache discussions focus on hit-side payoff — caching a positive result so you don't recompute it. In workloads like selective pub-sub, the miss side dominates because:

  • The underlying lookup (subscription registry call) is paid on every event
  • Most of those lookups return nothing
  • The cost of each lookup is non-trivial (network hop + registry evaluation)

Caching "no subscriptions" eliminates these redundant calls for high-volume event types with a substantial reduction in registry load (Source: sources/2026-07-29-atlassian-inside-the-events-rail).

TTL is the lever

  • Shorter TTL → better subscription freshness (newly-registered subscriptions take effect faster) but lower cache hit rate
  • Longer TTL → higher hit rate but subscribers wait longer for new registrations to take effect

Relationship to concepts/negative-caching

This is a specialized instance of concepts/negative-caching applied to subscription registries in selective pub-sub. The general concept covers DNS NXDOMAIN, sparse time-series, and empty API responses. This pattern is specifically about miss-heavy subscription lookups at high event throughput.

Seen in

Last updated · 602 distilled / 1,824 read