Caching with tags in app router
Answered
Kerry Beagle posted this in #help-forum
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?
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?
3 Replies
@Kerry Beagle 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?
* One revalidated tag should be enough
* No issues afaict
* No issues afaict
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 😦