Skip to content

About

Backend-agnostic caching for TypeScript/Node.js (beta) — intent-based API with L1 in-memory, stale-while-revalidate, circuit breaker, and optional zero-knowledge AES-256-GCM encryption via a Rust core. Works with Redis, Memcached, File, Workers KV, or CacheKit Cloud.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

281 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@cachekit-io/cachekit

npm License: MIT

TypeScript SDK for CacheKit — backend-agnostic caching with L1 in-memory, SWR, circuit breaker, and optional zero-knowledge encryption.

Note

Status: beta — CacheKit is in closed beta ahead of 1.0. APIs are stabilising; minor breaking changes may still occur between 0.x releases.

Requirements

  • Node.js 22+ (Node entrypoint) or Cloudflare Workers (workerd). The CommonJS build (require()) needs Node.js 22.12+, because it loads the ESM-only @noble/hashes through require(esm)
  • Redis 6+ (Node Redis backends)

Installation

npm install @cachekit-io/cachekit

Works with Redis, Memcached, File, Workers KV, or CacheKit Cloud. The full README, with the quick start, configuration and API reference, is the package's own: packages/cachekit/README.md.

Packages

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.

Architecture

cachekit-ts/
├── packages/
│   ├── cachekit/           # TypeScript SDK
│   │   ├── src/
│   │   │   ├── cache.ts          # Core cache implementation
│   │   │   ├── intents.ts        # Intent-based API (.minimal, .production, .secure, .io)
│   │   │   ├── backends/         # Redis, CacheKit Cloud, 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

Documentation

Note

docs.cachekit.io is not live yet, so the site links below do not resolve. Until it is, the package README is the reference.

In this repository

Contributing

See CONTRIBUTING.md for building from source, running the tests and benchmarks, and sending a change.

License

MIT

About

Backend-agnostic caching for TypeScript/Node.js (beta) — intent-based API with L1 in-memory, stale-while-revalidate, circuit breaker, and optional zero-knowledge AES-256-GCM encryption via a Rust core. Works with Redis, Memcached, File, Workers KV, or CacheKit Cloud.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages