Should Next.js App Router provide a built-in middleware layer for route-level caching and revalidation? #85336
Unanswered
SHAWON0c
asked this question in
App Router
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
💡 Idea / Discussion
With the growing use of Server Actions and dynamic rendering, I’ve been thinking about how we handle route-level caching and revalidation in the Next.js App Router.
Right now, we rely on manual strategies — using
revalidateTag,revalidatePath, or custom middleware logic. But as projects scale, it gets harder to manage cache invalidation per route efficiently.🧩 Proposal
Would it make sense for Next.js to provide a built-in middleware layer or decorator-like API for caching at the route level? Something like:
Beta Was this translation helpful? Give feedback.
All reactions