This week in caching: invalidation that isn't just short TTLs
Three reads on the famously hard problem.
— tag-based over time-based — invalidate by what changed (this product, this author), not by guessing a TTL. Cache tags / surrogate keys make this exact.
— write-through vs cache-aside — write-through updates cache on write (always fresh, slower writes); cache-aside is simpler but races on concurrent writes. Know which you've built.
— generation/namespace busting — bump a version prefix on all keys (v17:user:42) to invalidate a whole class instantly without scanning. Elegant for grouped flushes.
Bookmark: the cache-aside vs write-through breakdown — picking deliberately ends a whole genre of "stale data" bugs.
Cache Catch
@CacheCatch
This week in caching: invalidation that isn't just short TTLs
Этот пост опубликован в Telegram-канале Cache Catch. Подписаться можно по ссылке: @CacheCatch.