I published but my app still shows old translations

5 मिनट पठनमध्यम

You've published new translations but your app still shows the old ones. This is almost always a caching issue — here's how to diagnose and resolve it.

Understanding the cache layers

When you publish, translations flow through several cache layers before reaching the user:

You publish
  → CDN origin updated (immediate)
  → CDN edge cache purged (immediate)
  → SDK in-memory cache expires (up to 60s)
  → Browser/framework cache expires (up to 60s)
  → User sees new translations

The maximum delay from publish to user is approximately 60 seconds in most setups.

Quick fixes

1. Wait 60 seconds and hard-refresh

The simplest fix: wait one minute, then press Cmd+Shift+R (Mac) or Ctrl+Shift+R (Windows) to bypass browser cache.

2. Verify the CDN has fresh data

curl -I https://cdn.better-i18n.com/your-org/your-project/en/translations.json

Check the Age header — if it's 0 or very low, the CDN has fresh data. The x-cache-status header shows HIT or MISS.

3. Clear SDK cache (development)

If you're in development and need to see changes immediately, the SDK's TtlCache can be bypassed by restarting your dev server.

Framework-specific behavior

Next.js (ISR)

Next.js ISR adds its own cache layer. With the default messagesRevalidateSeconds: 30, it can take up to 30 seconds for Next.js to re-fetch from the CDN.

To force immediate refresh in development:

  • Restart the dev server, or
  • Add ?_vercel_no_cache=1 to bypass ISR cache

In production: ISR works on a stale-while-revalidate basis. The first request after 30 seconds triggers a background revalidation. The next request gets fresh data.

React SPA / TanStack

The SDK's TtlCache has a 60-second TTL. After 60 seconds, the next render cycle fetches fresh translations.

Expo / React Native

Mobile apps also use the 60s TTL. Force-closing and reopening the app triggers a fresh fetch. If you have persistent storage enabled, the SDK writes fresh data to storage on each successful CDN fetch.

Remix / Hydrogen

Loader-based fetching means each server request can get fresh data. The SDK's TtlCache is the main cache layer (60s).

Purge verification

When you publish, the platform automatically purges CDN cache. If you suspect the purge didn't work (rare), you can verify:

  1. Fetch translations directly from CDN
  2. Check the response body for your new translation values
  3. If stale, wait 60 seconds (CDN max-age: 60 will expire naturally)

Note: The CDN is designed to always return HTTP 200, even during errors. If you see {} or { "fallback": true }, it means translations haven't been published yet (not a cache issue).

When to worry

If translations are still stale after 5 minutes:

  1. Check the dashboard — did the publish actually complete?
  2. Verify the CDN URL directly with curl
  3. Check your project ID matches exactly (case-sensitive)
  4. Run better-i18n doctor for diagnostic info

Next steps