This week in caching: a deploy-time CDN purge checklist
How to invalidate the edge without nuking your hit ratio. Gold if you push multiple times a day.
— Purge by surrogate key, not URL — tag responses with Surrogate-Key: product-123 and purge the tag; URL-by-URL purging misses param variants.
— Never 'purge everything' on routine deploys — a full flush cold-starts your origin into a thundering herd; reserve it for emergencies.
— Use stale-while-revalidate — let the edge serve the old object while it fetches the new one, so users never wait on origin.
— Soft-purge over hard-purge — mark stale instead of deleting; the edge can still serve it under grace if origin hiccups.
— Confirm with a versioned probe — request a known-changed asset and check the Age header reset to 0.
Credit to Fastly's docs for the soft-purge + surrogate-key pattern (it generalizes to most CDNs).
Bookmark: the 'stale-while-revalidate' RFC 5861 summary — short and load-bearing.
Cache Catch
@CacheCatch
This week in caching: a deploy-time CDN purge checklist
Этот пост опубликован в Telegram-канале Cache Catch. Подписаться можно по ссылке: @CacheCatch.