Skip to content
Discussion options

You must be logged in to vote

Hi! This is a very common confusion with the App Router on Vercel.

What usually happens is that something in the route is silently forcing it to be dynamic, so Vercel can’t serve it from the cache and has to run the Serverless Function on every request.

The most common triggers are:

  • Using cookies() or headers() anywhere in the tree
  • Reading request-specific data
  • fetch without proper caching config
  • Setting cache: 'no-store'
  • Using Server Actions in the same route
  • Having export const dynamic = 'force-dynamic' (even indirectly)

Any of these make the route SSR on every hit.

How to verify

Check the response headers in the browser:

  • If you see: x-vercel-cache: HIT → served from cache
  • If you see:

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@icyJoseph
Comment options

Answer selected by kawai-me
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants