An online magazine in Cape Town could only purge by exact URL. When an author's name changed, they manually purged 140 article URLs by hand and missed a dozen.
We designed a cache-tag architecture up front:
— Tagged every response with multiple tags: post-{id}, author-{id}, section-{id}, global-nav
— A post edit purged post-id; an author change purged author-id — every page they touch, in one call
— A nav change purged global-nav across the whole site instantly
— Kept tags under the provider's per-response limit by being deliberate, not tagging everything
— Logged every purge with its tag for an audit trail
The author-rename that used to take 30 manual minutes and missed pages became one author-42 purge that cleared all 152 affected pages atomically. Design tags at write time around how you'll need to invalidate — retrofitting tags onto a live site is painful.
The number that mattered: 152 pages purged correctly with a single tag call.
Edge of Glory
@EdgeOfGloryCDN
Designing cache tags before you need to purge
This post was published in the Telegram channel Edge of Glory. Subscribe here: @EdgeOfGloryCDN.