Router cache does not revalidate #66118
Labels
bug
Issue was opened via the bug report template.
locked
Middleware
Related to Next.js Middleware
Navigation
Related to Next.js linking (e.g., <Link>) and navigation.
Link to the code that reproduces this issue
https://github.com/Saman-Safaei-Dev/router-cache-bug
To Reproduce
1- Start the development server and open the web app.
2- Navigate to the dashboard or any random page to be redirected to the sign-in page (use the link provided on the home page).
3- Sign in to the website to set a cookie.
4- Close the browser and reopen the web page.
5- Click on the link you previously clicked to observe the bug.
Current vs. Expected behavior
I expect to dashboard get opened but nothing happens. router cache not revalidated on cookies().set and I redirected to signin page and then redirected to home. ( redirect chain )
Provide environment information
Which area(s) are affected? (Select all that apply)
Middleware, Navigation
Which stage(s) are affected? (Select all that apply)
next dev (local), next build (local), next start (local)
Additional context
No response
The text was updated successfully, but these errors were encountered: