Next.js Discord

Discord Forum

How to use revalidateTag on function that is not fetch()

Answered
Rule posted this in #help-forum
Open in Discord
I have a function getItemsFromDatabase(). How can I assign a tag for the function and use revalidateTag() function with it.
Answered by joulev
The only way to assign tags to such functions is unstable_cache
View full answer

4 Replies

Answer
If you don’t want to use unstable stuff, you have to use revalidatePath
Ah my bad. Could not find it. Thanks a lot!
Hey, did you manage to make it work, in particular in server actions? In 13.5.4 I don't have any update when I refresh my static routes