Skip to content
Discussion options

You must be logged in to vote

Hey! Let me try and explain. revalidateTag is different than res.revalidate in the Pages Router:

  • revalidateTag is a "purge", so it is not blocking to retrieve new data. There isn't a way to wait for the event to finish.
  • res.revalidate can be await-ed, and it does wait for the entire revalidation to complete.

We believe the non-blocking API is a better default for the App Router. You have a couple options here.

  1. You could call an API Route (pages/api) from your Server Action, which calls res.revalidate.
  2. You could call revalidatePath and then call fetch on the path, to initiate the revalidation of the data.

Replies: 2 comments 9 replies

Comment options

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

Comment options

You must be logged in to vote
8 replies
@sregg
Comment options

@roblonj
Comment options

@HialeahLiam
Comment options

@asnaeb
Comment options

@stephan-noel
Comment options

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