Blog

Your dream job? Lets Git IT.
Interactive technical interview preparation platform designed for modern developers.

XGitHub

Platform

  • Categories

Resources

  • Blog
  • About the app
  • FAQ
  • Feedback

Legal

  • Privacy Policy
  • Terms of Service

© 2025 LetsGit.IT. All rights reserved.

LetsGit.IT/Categories/Next.js
Next.jsmedium

App Router data fetching — how does Next.js cache `fetch()` by default?

Tags
#fetch#revalidate#cache
Back to categoryPractice quiz

Answer

In Server Components, Next can cache `fetch()` results and dedupe requests. You can opt out with `cache: 'no-store'` or set revalidation with `next: { revalidate: seconds }` to control freshness.

const res = await fetch('https://example.com/api', {
  next: { revalidate: 60 },
})

Related questions

Next.js
App Router data fetching: what do `cache: 'no-store'` and `revalidate` change?
#nextjs#fetch#cache
Next.js
Cache invalidation: what do `revalidatePath` and `revalidateTag` do?
#nextjs#cache#revalidate
Next.js
What does `router.refresh()` do in the App Router (and when use it)?
#nextjs#router#refresh
Next.js
Static vs dynamic rendering — how do you force a route to be dynamic and why?
#ssr#dynamic#cache
Next.js
Explain caching and revalidation in Next.js (fetch cache, revalidatePath).
#caching#revalidation#fetch