Menu
Back to Discussions

Cache Invalidation Strategy: TTL versus Explicit Invalidation

Gudrun Svensson
Gudrun Svensson
·1733 views
Hey everyone, I'm stuck on a classic caching problem and would love your thoughts. We're creating a new feature that really needs cached data. For some bits, a basic time-to-live (TTL) works fine. If the data is a few minutes old, no big deal. But for other crucial info, old data is a serious problem. Would you usually go with a short, strict TTL for those, or is it better to build in specific invalidation logic that kicks in when the original data updates? What are your usual approaches for choosing between these? I'm really interested in what you've found works in practice.
37 comments

Comments

Loading comments...