Yes, that would be great
Next.js/Vercel is unfortunately one of the frameworks that has this issue, and itās not something we are able to change on our end (itās up to Vercel and their CDNs).
In our Next starter kit, we have an example of how to map Dato cache tags to specific Next queries and then store that in an external KV (in this case, Turso): https://github.com/datocms/nextjs-with-cache-tags-starter/blob/main/lib/database.ts
This other discussion also has an example of how to modify that implementation to work with a redis-compatible store: NextJS + Vercel + Dato Cache Tags not always working - #5 by roger. At the time, that example targeted Vercel KV, a now-defunct, whitelabeled version of Upstash. Vercel deprecated that and now just links to third-party redis implementations, but the basic logic should still be the same and it shouldnāt be too hard to modify it e.g. for Valkey or similar.
This sort of mapping is not ideal, but is necessary as long as Next/Vercel has these small cache tag limits ![]()
I know this is frustrating, but as far as we can tell, our hands are kind of tied here due to Nextās limits. This is something weāve given a significant amount of thought and experimentation to in the past, and could not find a good solution to, hence our workarounds and all the mapping needed. If anyone has a better idea about how we could or should do this (like @martin.palma ācompressed bucketsā ideaā¦? which I still donāt quite understand, sorry)⦠please let us know and we can definitely investigate!