TypeScript SDK for CacheKit — backend-agnostic caching with L1 in-memory, SWR, circuit breaker, and optional zero-knowledge encryption. Works with Redis, Memcached, File, Workers KV, or CachekitIO.
Status: beta — CacheKit is in closed beta ahead of 1.0. APIs are stabilising; minor breaking changes may still occur between 0.x releases.
| Package | Description |
|---|---|
| @cachekit-io/cachekit | Main SDK (Node + Cloudflare Workers) |
| @cachekit-io/cachekit-core-ts | Native bindings (N-API, Node) |
| @cachekit-io/cachekit-core-wasm | wasm32 bindings (Cloudflare Workers) |
Live example: Skyline — this SDK serving Bluesky firehose analytics from a Cloudflare Workers edge API, reading cache entries written live by the Python SDK on one shared interop namespace.
# Install dependencies
pnpm install
# Build all packages
pnpm build
# Run tests
pnpm test
# Lint
pnpm lintcachekit-ts/
├── packages/
│ ├── cachekit/ # TypeScript SDK
│ │ ├── src/
│ │ │ ├── cache.ts # Core cache implementation
│ │ │ ├── intents.ts # Intent-based API (.minimal, .production, .secure, .io)
│ │ │ ├── backends/ # Redis, CachekitIO, Memcached, File backends
│ │ │ ├── l1/ # In-memory LRU cache
│ │ │ ├── reliability/ # Circuit breaker, retry
│ │ │ ├── encryption/ # Encryption manager
│ │ │ ├── serialization/ # MessagePack + key gen
│ │ │ └── invalidation/ # Redis pub/sub
│ │ └── test/
│ │ ├── integration/ # Redis integration tests
│ │ └── protocol/ # Protocol v1.0 compliance
│ │
│ └── cachekit-core-ts/ # Rust N-API bindings
│ ├── src/lib.rs # ByteStorage, Encryptor, KeyRotation
│ └── Cargo.toml
│
├── .github/workflows/ # CI/CD
├── turbo.json # Build orchestration
└── pnpm-workspace.yaml
MIT