Menu

Post image 1
Post image 2
Post image 3
Post image 4
Post image 5
Post image 6
Post image 7
Post image 8
Post image 9
Post image 10
Post image 11
Post image 12
Post image 13
Post image 14
Post image 15
1 / 15
0

Stop Redeploying to Update Translations: Granular Edge Cache Invalidation with Cloudflare Purge API

DEV Community·Gary Stupak·about 1 month ago
#47qcNASn
#axis#how#why#cache#purge#i18n
Reading 0:00
15s threshold

Edge-Native i18n with Astro & Cloudflare Workers - Part 3 In Part 1 , I made a bold promise. Translations, I argued, are not code - they are data . Your Worker shouldn't care whether you support two languages or fifty. Adding a typo fix to a German translation shouldn't feel like shipping a software release. I genuinely believed I had delivered on that promise. The architecture stored translations in Cloudflare KV, cached them at the edge, and invalidated stale entries via content-based hashing. TRANSLATIONS_VERSION - a SHA hash of the translation bundle - was baked into the Worker as a build-time constant and embedded into every cache key. Change a string, regenerate the hash, and all old cache entries became invisible. Clean, deterministic, content-driven. Then I deployed the EdgeKits website to production and noticed something uncomfortable. I wanted to tweak the hero heading on the Spanish landing page. But the only way to push that change was to run npm run i18n:migrate and redeploy the Worker.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More