Next.js Discord

Discord Forum

Caching with tags in app router

Answered
Kerry Beagle posted this in #help-forum
Open in Discord
Kerry BeagleOP
Hi all,

Trying to understand how caching under the app router works in terms of tags. Specifically:

- if a given fetch request has multiple tags, do all of them need to be invalidated, or just one of them for the fetch to be re-executed next request?
- can tags contain secrets that shouldn’t be exposed to the client?
Answered by joulev
* One revalidated tag should be enough
* No issues afaict
View full answer

3 Replies

Answer
@joulev * One revalidated tag should be enough * No issues afaict
Kerry BeagleOP
Interesting, thanks for the response. I’ve been playing around with it the last few days trying to make it work but no matter what it never seems to revalidate the fetch after busting a tag. Struggled to the point where i’ve just disabled all caching 😦