Skip to content

Auto-population for KVΒ #538

@james-elicx

Description

@james-elicx

We need to migrate the KV adapter to populate the KV namespace instead of relying on static assets as a fallback. This also unlocks being able to use TTL for KV properly.

A few more things we would tackle while updating the cache handlers:

  • debug in R2 should be enable when process.env.NEXT_PRIVATE_DEBUG_CACHE === 1 (see KV)
  • the handler and the the populate cache should share constants instead of repeating magic strings in different files
  • we can now assume that process.env and the bindings are available in the ctor and do not need to be lazily retrieved

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions