You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With v2, my frontend is making fetch requests and I am using { next: { tags: [ "PRODUCT_SLUG" ] } } in the RequestInit. I have an afterChange hook in Payload that sends the document's slug to a webhook that runs revalidateTag with the provided slug. This ensures re-fetching (and re-rendering) from the DB only happens after an update has been made in the CMS.
If we are using the payload client directly in our server actions, how can we cache and tag those requests?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
With v2, my frontend is making
fetch
requests and I am using{ next: { tags: [ "PRODUCT_SLUG" ] } }
in theRequestInit
. I have anafterChange
hook in Payload that sends the document's slug to a webhook that runsrevalidateTag
with the provided slug. This ensures re-fetching (and re-rendering) from the DB only happens after an update has been made in the CMS.If we are using the payload client directly in our server actions, how can we cache and tag those requests?
Beta Was this translation helpful? Give feedback.
All reactions