STEP 8 OF 9 · PURGE
Purge after the write
To shrink the window, the edit flow also sends a purge (an explicit delete) for /abc123 to the cache. The next request misses and reads the new target.
Order matters. Write the store first, then purge. If you purge first, a request can arrive in between, miss, read the old row and put the old target straight back.
Even in the right order there is a rare race: a request that read the old row just before the write can finish its cache fill just after the purge. And purges are messages, so they can get lost. Keep the TTL as the safety net for both.
Why it matters. Invalidation makes changes fast in the normal case; the TTL keeps the worst case bounded when invalidation fails.