This week in caching: invalidation done right
Case studies in not nuking the whole cache on every edit:
— Magazine, 200k articles — switching from full purge to tag-based purge (Varnish xkey) on publish dropped the post-edit cache-miss storm; origin load after a homepage update fell from a 40s spike to a flat line.
— Headless commerce — surrogate keys per product meant a price change purged 3 URLs instead of the entire catalog; hit rate stayed above 90% through a flash sale.
— Docs site — soft-purge (serve stale, revalidate in background) hid a slow rebuild so users never saw a cold-cache 4s load.
The through-line: invalidation precision is what lets you cache aggressively. Blunt purges punish you for editing.
Bookmark: read Fastly's surrogate-key docs even on other stacks — the mental model transfers everywhere.
Cache Catch
@CacheCatch
This week in caching: invalidation done right
Этот пост опубликован в Telegram-канале Cache Catch. Подписаться можно по ссылке: @CacheCatch.