highfive's blog

Cache Invalidation Notes

December 21, 2025 · 1 min read · 96 words · highfive

Caching is not just a performance trick. It is a promise about how stale data is allowed to be.

Questions to ask

  • Who owns the source of truth?
  • How stale can the cached answer be?
  • Can stale reads cause money, security, or correctness problems?
  • Is the key stable?

TTL is a product decision

A short TTL reduces stale reads but increases backend load. A long TTL improves performance but makes mistakes more visible.

Invalidation styles

Pull-based invalidation uses expiration. Push-based invalidation updates or deletes keys when the source changes.