What is going on
Your Next.js fetch requests cache data too aggressively, serving stale information even after cache revalidation. Updated data doesn't appear, users see outdated content.
Fetch caching issues occur when cache options aren't set correctly, revalidate tags aren't applied, or browser cache conflicts with Next.js caching.
Error messages you might see
Common causes
- Using default fetch cache without explicit revalidate time
- Revalidate time set too high, keeping stale data too long
- Not using revalidateTag() for on-demand revalidation
- Browser cache conflicting with Next.js cache (Set-Cookie, Cache-Control headers)
- ISR not triggering revalidation properly on deployment
How to fix it
Set revalidation: Control cache duration:fetch(url, { next: { revalidate: 3600 } }) caches 1 hour. Use 0 for no cache.
Use revalidateTag(): For on-demand updates:fetch(url, { next: { tags: ['posts'] } })
// In server action: revalidateTag('posts')
Disable cache for dynamic data: const data = await fetch(url, { cache: 'no-store' }) always fetches fresh.
Check headers: Ensure Cache-Control header set correctly. Vercel sets cache headers automatically, don't override.
Getting help takes about a minute
No hiring, no back and forth. A real person looks at your app.
-
1
Describe it
Tell us what you need in plain words. You don't have to be technical or have an account to start.
-
2
Free 15-minute call
A verified developer calls you. Many tasks are sorted right there, and it costs nothing.
-
3
Pay after you approve
If there is more to do, you get one fixed price up front. You pay only once you are happy.
Real people, reviewed by hand
Developers who do this every day
Every developer is approved by our team before they can take a task. Describe yours and the first one who is free picks it up.
Get helpQuestions
What's the default fetch cache behavior?
By default, Next.js caches fetch results at build time. Use revalidate option to refresh periodically.
How do I invalidate cache immediately?
Use revalidateTag() in server action after mutation: revalidateTag('posts'). Cache invalidates immediately across all pages using that tag.
Should I use cache: 'no-store'?
Only for user-specific data or real-time updates. For public data, use ISR with revalidate time for better performance.