revalidateTag not rly working
Answered
Little fire ant posted this in #help-forum
Little fire antOP
I have a query with unstable cache tag and in PayloadCMS after mutation i'm trying to revalidate the tag, but it does nothing.
if i'm using dynamicIO and the new use cache it works perfectly but breaks the whole app with the Suspense thingy. Any tips?
if i'm using dynamicIO and the new use cache it works perfectly but breaks the whole app with the Suspense thingy. Any tips?
Answered by LuisLl
- First parameter is the fn to be cached.
- second parameter is basically the key that identifies the cache, it’s automatically generated by next based on your function signature itself.
- third parameter is what you NEED, it’s a options object that let’s you configure the cache control, such as revalidation tags and time based revalidation…
- second parameter is basically the key that identifies the cache, it’s automatically generated by next based on your function signature itself.
- third parameter is what you NEED, it’s a options object that let’s you configure the cache control, such as revalidation tags and time based revalidation…
5 Replies
Oh well, you need the 3rd parameter in which you’ll define the invalidation tags
- First parameter is the fn to be cached.
- second parameter is basically the key that identifies the cache, it’s automatically generated by next based on your function signature itself.
- third parameter is what you NEED, it’s a options object that let’s you configure the cache control, such as revalidation tags and time based revalidation…
- second parameter is basically the key that identifies the cache, it’s automatically generated by next based on your function signature itself.
- third parameter is what you NEED, it’s a options object that let’s you configure the cache control, such as revalidation tags and time based revalidation…
Answer
This same issue was solved recently with the same solution:
https://nextjs-forum.com/post/1330254781016571945#message-1330258056121946113
https://nextjs-forum.com/post/1330254781016571945#message-1330258056121946113
Did that solve your issue?