revalidateTag not rly working
Unanswered
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?
3 Replies
Australian Freshwater Crocodile
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 the dependencies (arguments) of your function and your function signature itself, but you can add more entries in case you’re accessing external variables.
- third parameter is 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 the dependencies (arguments) of your function and your function signature itself, but you can add more entries in case you’re accessing external variables.
- third parameter is a options object that let’s you configure the cache control, such as revalidation tags and time based revalidation…