Cloudflare KV through a typed store: get, put, list, delete.
KV is Cloudflare's eventually-consistent key-value store — the right tool for caches, feature flags, and read-heavy configuration. Base wraps it in a typed KeyValueStorage interface behind the usual binding-and-inject pattern.
Declare the store
Three names line up on one identity. In wrangler.toml:
[env.Production]kv_namespaces = [{ binding = "CACHE", id = "<namespace-id>" }]
list(options?): prefix, limit, cursor; the result is a discriminated union on hasMore, so the cursor for the next page only exists when there is a next page:
KV reads are fast and globally cached; writes are eventually consistent — a read moments after a write may see the old value, especially in another region. Perfect for caches and configuration; wrong for counters, inventories, or anything transactional — that's the ORM or a Durable Object.