Next.js Discord

Discord Forum

Setting cache tags on non-fetch calls

Answered
Spectacled Caiman posted this in #help-forum
Open in Discord
Spectacled CaimanOP
Is it possible to set a cache tag on non-fetch calls (for example, orm (drizzle) db calls)? I think they use fetch in the background.
Answered by Ray
oh for tag, need to use it with unstable_cache
View full answer

8 Replies

Spectacled CaimanOP
not sure how how the route segment config allows me to set tags on a specific db call, but with unstable cache, each string in a keyPart is a cache tag?
oh for tag, need to use it with unstable_cache
Answer
the tag part
in option object
Spectacled CaimanOP
ahh got it, thanks alot!