Skip to content

QuizNot attempted

Request memoization and the Router Cache

Which statements about Next.js caching are true?

Select all that apply.

1–4 to choose, Enter to submit
Show answer & explanation

Correct answers:

  • Identical fetch calls (same URL and options) during one server render are deduplicated: request memoization
  • The client Router Cache keeps visited and prefetched route segments in memory for back/forward and instant navigation
  • router.refresh() re-fetches the current route from the server without losing client state
  • Identical fetch calls in one server render are deduplicated (request memoization), the client Router Cache keeps visited and prefetched segments for instant back/forward, and router.refresh() refetches the current route's server payload while keeping client state.
  • Not shared across users: memoization lives for one render pass of one request only
  • cross-request caching is the Data Cache.
  • For non-fetch data sources wrap the function in React's cache().