caching, invalidate or refresh, what's your goto?
Rania Benali
·3039 views
Hey everyone, I've been thinking a lot about caching strategies recently. When the data in a cache gets old, do you usually go with an invalidation approach, where you just remove the stale item and let it be fetched again when needed? Or do you prefer a refresh approach, where you update the cached item ahead of time? Both seem to have their own pros and cons when it comes to speed, consistency, and how much work the main system has to do. I'm really curious to hear what methods you've found work best in real life and the reasons behind them.
30 comments