Skip to content
Discussion options

You must be logged in to vote

Not sure why this was closed and reopened, but from the behavior described, this looks expected in the App Router rather than a bug.

For dynamic routes, revalidate alone does not always mean unknown slugs will be generated on first request and cached like ISR. Next needs the route to be statically generatable.

For large blogs/products/catalogs, this pattern works well:

export const revalidate = 86400
export const dynamicParams = true

export async function generateStaticParams() {
  return []
}

This means no slugs are generated at build time, unknown slugs are allowed at runtime, and the page can be generated on first request, cached, and revalidated later.

Just make sure the route is not…

Replies: 1 comment 1 reply

Comment options

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

Answer selected by bafana729374
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants