October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk5 min

Next.js 15 Caching: What to Cache and When to Revalidate

Next.js 15 does not persistently cache server-side fetch requests by default. Understand the four cache layers and choose explicit freshness and invalidation policies.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

In Next.js 15, server-side fetch is not persistently cached by default. Opt in with cache: 'force-cache' or set a freshness interval with next.revalidate; use no-store when each request must get current data from its source. The key to reliable performance is to choose a policy for each data source, then distinguish it from caching rendered routes and client navigation.

Start by identifying which cache layer you mean

Next.js has four separate mechanisms often described loosely as “the cache.” They store different things and operate at different scopes. A setting that affects fetched data does not automatically describe every other layer.

As an Amazon Associate I earn from qualifying purchases.

Layer What it caches Scope and lifetime
Request memoization Repeated eligible GET calls made during a render Limited to the render/request lifecycle; it is not persistent storage across incoming requests.
Data Cache Data from opted-in server-side fetches Can persist across incoming requests and deployments until revalidation or opting out.
Full Route Cache Rendered server output for a route A route-output layer, distinct from the storage of the data used to render it.
Router Cache Route payloads used for client-side navigation Held in client memory and cleared by a full page refresh.

When a repeated call appears unexpectedly efficient within one render, request memoization may be involved. If data is reused between incoming requests, consider the Data Cache. If rendered output is reused, consider the Full Route Cache. If behavior changes during client navigation, the Router Cache may be relevant.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Is fetch cached by default in Next.js 15?

No: server-side fetch is not persistently cached by default in Next.js 15. Earlier application assumptions may therefore produce different freshness and performance behavior after an upgrade. Select the policy explicitly for each data source.

Policy Use it when Trade-off
cache: 'force-cache' The response can be reused across incoming requests and should remain cached until invalidated or otherwise revalidated. Data may not reflect a source update until the cache is revalidated or invalidated.
next.revalidate The response can be reused, but it should be refreshed on a chosen time interval. Time-based revalidation can serve stale data while a refresh happens in the background.
cache: 'no-store' The response must be fetched from its source for each incoming request, such as user-specific or freshness-critical data. The request cannot rely on persistent Data Cache reuse.

Opt into persistent caching

Use this policy when reuse across requests is appropriate:

const response = await fetch('https://api.example.test/catalog', {
  cache: 'force-cache',
})

Set a freshness interval

Use next.revalidate when a finite interval better matches how quickly the content needs to become fresh. In this illustrative example, the interval is 300 seconds; choose a value that fits the data, rather than treating 300 seconds as a framework recommendation.

const response = await fetch('https://api.example.test/catalog', {
  next: { revalidate: 300 },
})

Fetch current source data per request

For data that should not be reused from the persistent Data Cache:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
const response = await fetch('https://api.example.test/account', {
  cache: 'no-store',
})

Make freshness requirements explicit. Do not assume that the default behavior from an earlier Next.js version still applies.

Choose revalidation by what causes the data to change

Use a time interval when changes are infrequent and a brief stale response is acceptable. Use event-driven invalidation when a known update—such as a CMS edit or a mutation—should make affected data fresh without waiting for a timer.

  • Time-based: Configure next.revalidate for data whose acceptable freshness can be expressed as an interval. A stale response may be served while the cache refreshes in the background.
  • Path-based: Use revalidatePath when an update should invalidate a known route or path.
  • Tag-based: Use revalidateTag when data has been grouped by a tag and an update affects that group. Choose tags around data that changes together.

For a CMS integration, the practical sequence is to identify the routes and data affected by an edit, then invalidate those paths or data groups when the update is confirmed. Avoid broad invalidation when a narrower path or tag represents the actual change. Time-based and event-driven policies solve different problems; choose based on the update trigger and the freshness users need.

Keep fetch policy separate from route segment policy

Route segment settings are broader controls: dynamic, revalidate, and fetchCache can affect a page, layout, or Route Handler. An individual fetch or a child segment with a shorter revalidation interval can make a route refresh more frequently than expected. When behavior surprises you, inspect the full route tree as well as the individual requests.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

In particular, do not treat a route-level setting as a substitute for deciding whether each data source is reusable. The useful questions are still: what is being cached, for how long, and what event should make it fresh?

What changed in Next.js 15 for routes and navigation?

Next.js 15 changed two defaults that matter when migrating from earlier behavior:

  • GET Route Handlers: Their responses are uncached by default, unlike the earlier cached-by-default behavior.
  • Client Router Cache: It is uncached by default compared with earlier behavior.

These changes affect assumptions about freshness and navigation, not just server-side fetch. If an upgraded application appears to refresh route data more often or behave differently during navigation, check which version-specific default the old implementation relied on before adding a cache policy.

Use streaming for slow server work, not as a cache policy

loading.js and Suspense boundaries let a page progressively deliver available content while slower server work continues. Place boundaries around portions that may take longer so users can receive ready parts without waiting for every part to finish.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Streaming is a rendering and delivery strategy; it does not make the underlying data persistently cached. It can improve how quickly useful content starts appearing, but it does not establish that total server execution time is lower. Treat cache freshness and progressive rendering as separate decisions.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Plan cache storage for self-hosted, multi-instance deployments

In a self-hosted deployment, check where cached data is stored and whether it remains available for the lifetime and topology you need. With multiple containers or instances, per-instance storage may not provide shared or consistent cache behavior. Depending on the deployment, a shared or durable cache arrangement may be needed.

Deployment consideration Per-instance storage Shared or durable arrangement
Sharing between instances Each instance may have its own cache state. Can provide a common cache across instances if configured for that purpose.
Persistence Behavior across restarts depends on the instance storage model. Can be designed to persist beyond an individual instance or restart.
Operations May be simpler for a single-instance setup. Requires deployment-specific storage and operational choices.

There is no universally correct storage topology: choose one that matches how instances are created, restarted, and expected to share cache state. The Next.js 15 guidance here concerns configuration needs, not a preferred provider.

A practical policy checklist

  1. Name the layer. Decide whether the issue concerns repeated calls in one render, data reused between requests, rendered route output, or client navigation.
  2. Set the freshness requirement. Determine whether stale data is acceptable, for how long, and whether the response is user-specific.
  3. Choose a fetch policy. Opt into persistent reuse with force-cache, set a suitable next.revalidate interval, or use no-store for source-fresh data.
  4. Choose the invalidation trigger. Use a time interval for tolerable stale-while-revalidate behavior, or a path/tag invalidation when a known update should refresh affected content.
  5. Inspect the route tree. Check segment-level dynamic, revalidate, and fetchCache settings alongside individual fetch options.
  6. Separate delivery from reuse. Add loading.js or Suspense boundaries for progressive delivery when server work is slow; do not assume that streaming changes persistence.
  7. Validate deployment assumptions. For self-hosted multi-instance deployments, establish whether cache state must be shared or survive instance restarts.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.