App Router

Static Data

  • By default, data fetching in Next.js is cached static.
  • This example statically caches data fetches for Post 1 and 2.
  • A random third post is fetched on-demand the first time it is requested.
  • Try navigating to each post and noting the timestamp of when the page was rendered.