Skip to content

[⚡ Feature]: Add KV (or custom) support for revalidateTag (next/cache) #529

@juanferreras

Description

@juanferreras

Hi all!

I've seen several comments from maintainers ([1], [2]) following up the great work of feat: fetch (suspense) cache handling, and next/cache support #419 by @james-elicx that given limitations on Cache API (e.g. per-colo cache and requires a custom domain to be configured), we'd mostly want to use alternative storage mechanisms in production (most likely KV, but perhaps other users might prefer D1/R2/DO based on specific use cases or even something else).

I understand that the ultimate intention is to let users define in their own next.config.js their own adaptor for caching – but there might be a pre-made snippet for KV, or an exported util they can reference.

I've noted that there isn't any issue tracking that – so wanted to drop this in for that purpose, and in case maintainers want to explain more what they have in mind (or if there are any blockers they're tracking). I'm happy to take a look at contributing the changes too.

Thanks!

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions