Next.js Discord

Discord Forum

Typesafe caching and tag revalidation

Unanswered
Giant panda posted this in #help-forum
Open in Discord
Giant pandaOP
Hey, I was curious whether anyone had a good system for ensuring typesafety when using unstable_cache and revalidateTag

1 Reply

Giant pandaOP
Thinking about doing something like this:
type ValidCacheTags = `profile-${string}` | `jobs` | `job-${string}`