alepha@docs:~/framework/docs/reference/providers$
cat CloudflareKVProvider.md | pretty
1 min read
Last commit:

#CloudflareKVProvider

#Import

typescript
1import { CloudflareKVProvider } from "alepha/cache";

#Overview

Cloudflare KV cache provider.

Uses a KV namespace binding for all cache operations. Keys are stored as: {alepha.name}:cache:{name}:{key}, with {key} escaped so a : in it cannot be read as part of the name. Two apps binding one KV namespace never read each other's entries, and clear() deletes this app's entries only.

Required Cloudflare binding:

  • KV_CACHE - A KV namespace binding in wrangler configuration