Cloudflare Workers KV

Use an application-supplied Workers KV binding for namespaced cache storage with explicitly eventual capabilities.

Visit Cloudflare Workers KV ↗

Supported features

Caching

Use namespaced portable caches with typed serialization, tag invalidation, and explicit stampede-protection capabilities across Redis, Workers, and local runtimes.

Namespaced key-value caching · Tag invalidation

Package reference

@playstack/cache

Make consistency characteristics visible

@playstack/cache/cloudflare-kv implements the portable cache contract over a structural Workers KV binding. KV cannot provide an atomic distributed lock and propagates writes eventually, so the driver declares process-local stampede protection and eventual tag invalidation.

ts
import { createCache } from '@playstack/cache'
import { CloudflareKvCacheStorage } from '@playstack/cache/cloudflare-kv'

const cache = createCache({
  app: 'billing',
  environment: 'production',
  driver: new CloudflareKvCacheStorage(env.CACHE),
})

Logical millisecond expiry travels with the stored value while KV's provider expiration handles physical cleanup. The exact binding remains exposed through the driver client.

Go

Playstack Pro tag
OriginsPricingBlogNewsletterChangelogStatusRoadmap
ContributorsCommunityIn Use ShowcaseCase StudiesPartnersSponsors
FAQsSupportContact

© 2026 Playstack. All rights reserved.

With OSS
Terms of ServicePrivacy PolicyCookie PolicyImprint

By

Commune Software