Stores Payload key-value data in Redis through the payload.kv API
Cloudflare Workers KV Adapter
Adds a Cloudflare Workers KV key-value store to Payload's kv API
Installation
pnpm add @digitalwerber/payload-kv-cloudflare About
This adapter gives Payload a key-value store backed by Cloudflare Workers KV. Once it is set as the kv adapter, code can read and write values through the Payload instance, and entries can expire after a time set per key prefix. It suits caching data such as query results at the edge without adding a separate Redis server.
Keys longer than 512 bytes are shortened automatically, and expiration is never set below 60 seconds. Listing and clearing keys page through the whole namespace, so large stores can take several calls to clear. Workers KV is eventually consistent, so the store is a poor fit for counters, locks, or values that several requests must agree on at once.
Package info
- Package name
@digitalwerber/payload-kv-cloudflare- Latest version
0.1.0- Unpacked size
- 21 kB
- License
- MIT
- Weekly downloads
- 185
- Last publish
- Nov 4, 2026
Similar adapters
More in CacheStores Payload key-value data in Upstash Redis with key prefixes and expiry rules
Stores Payload key-value data in a Cloudflare KV namespace