Next.js Discord

Discord Forum

Router Cache Invalidation with redirect

Unanswered
Komondor posted this in #help-forum
Open in Discord
KomondorOP
Hello everyone, I have a question about the router cache:

I have a user detail view, when I click the edit button I go to the edit page, in the edit page I trigger a server action that updates the database, and after the database update I redirect the user (I don't call revalidatePath or revalidateTag, only redirect)

Even when user detail view still is cached (30s), the redirect I trigger on the edit page still seems to invalidate the router cache (30s for dynamic routes)

so my question is: does router cache (30s for dynamic pages) is invalidated by redirect calls?

0 Replies