At least 10 questions — mix of concept, syntax, practical, and logic. Score ≥80% (enforced by the API) to save progress.
15 questions · concept 5 · syntax 3 · practical 4 · logic 3
1. What can Next cache? Concept
Only fetch results made with the native fetch API Full routes, fetch results, and rendered output depending on configuration Only fully static pages with no dynamic segments Only React component state between navigations
2. Static vs dynamic rendering? Syntax
Static renders per request; dynamic is prerendered at build Static can be cached/prerendered; dynamic renders per request/user Static uses Server Components; dynamic uses Client Components Static caches in the browser; dynamic caches at the CDN
3. Why cache? Practical
To guarantee every user always sees the freshest data Speed and lower backend load for unchanged data To move rendering from the server into the browser To store per-user session data between requests
4. User-specific pages? Logic
Static, but keyed by the user’s ID in the route cache Static, since reading cookies makes each render unique Dynamic only for the first request, then cached per session Usually dynamic — don’t serve one user’s HTML to another from shared cache carelessly
5. fetch cache option awareness? Concept
The cache option only works on POST requests fetch ignores cache options unless you also set no-store cache/revalidate options affect whether results are reused Only revalidate matters; the cache option is deprecated
6. Route segment config? Practical
A cacheConfig object exported from next.config export const dynamic / revalidate style controls Decorators like @Dynamic() on the page component A <Cache> wrapper component around the page
7. CDN caching? Syntax
The CDN caches only static assets, never rendered HTML CDN caching replaces Next’s own data cache entirely The CDN caches each user’s private HTML by cookie Deployment platforms may cache responses at the edge
8. Cache stampede risk? Logic
Many clients refetch together — design revalidate/tags thoughtfully A single stale entry corrupts every other cache key The cache grows unbounded until it exhausts disk space Two revalidate values on one route cancel each other out
9. Debugging stale UI? Concept
Assume a hydration mismatch and add "use client" Bump the component key to force React to remount Check caching/revalidation path before blaming React state only Clear localStorage since that’s where Next stores the cache
10. Which statement is true? Practical
Caching is powerful but must respect auth and freshness rules Caching should include the user’s cookies in the shared entry Disabling all caching is the safest default for every app Cached pages never need revalidation once they’re built
11. By default, can Next cache this fetch result? Concept intermediate
const res = await fetch(url); // default optionsNo — Next can never cache a fetch result Yes — depending on configuration, fetch results can be cached No — only getStaticProps results are cached Yes, but only the response status, not the body
12. What does this segment config do? Syntax advanced
export const dynamic = 'force-dynamic';Forces dynamic rendering per request, opting out of static caching Forces the route to prerender statically at build time Enables dynamic imports for the route’s components Makes fetch calls dynamic but keeps the page static
13. This user-specific dashboard is statically cached. What is the risk? Practical advanced
// dashboard shows the logged-in user's private data, statically cachedThe dashboard would fail to build because it reads cookies Static caching strips the user’s data, showing an empty page Each request would rebuild the whole app to stay fresh One user’s cached HTML could be served to another; keep it dynamic
14. What does revalidate: 60 mean here? Logic intermediate
fetch(url, { next: { revalidate: 60 } });Serve stale data for 60 seconds, then delete it from the cache Cache the result and refresh it at most every 60 seconds Refresh the data on every request once 60 seconds pass Keep the data cached until 60 requests have been served
15. UI shows old data after an update. What should you check first? Concept intermediate
// UI shows old data after a successful updateThe caching/revalidation path — the data may be served from cache Whether the component forgot to call useState after the write Whether the browser’s HTTP cache needs a hard refresh Whether the database write silently rolled back
Submit quiz Checking your session…