Menu

1 / 2

Next.js 15 Caching Explained: Why Your Data Keeps Showing as Stale

DEV Community·Mahdi BEN RHOUMA·6 months ago
#OdS71k5X
#nextjs#caching#approuter#cache#const
Reading 0:00
15s threshold

Next.js 15 Caching Explained: Why Your Data Keeps Showing as Stale

If you upgraded from Next.js 14 to 15 and your pages suddenly stopped refreshing — or started hitting your database on every request — you are not alone. The caching model changed fundamentally. This is the guide I wish existed when I spent a day debugging it.

What Changed in Next.js 15

In Next.js 14, fetch() inside Server Components was cached by default:

// Next.js 14: this was CACHED (force-cache) const data = await fetch ( ' https://api.example.com/posts ' );

Enter fullscreen mode

Exit fullscreen mode

In Next.js 15, the default flipped:

// Next.js 15: this is NOT cached (no-store) const data = await fetch ( ' https://api.example.com/posts ' );

Enter fullscreen mode

Exit fullscreen mode

This single change affects every Server Component in your app that uses fetch() .…

Continue reading — create a free account

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