@ninots/cache
v0.2.0
Published
Bun-native cache management for Ninots Framework
Readme
@ninots/cache
Bun-native cache for Ninots — array, file, sqlite, and redis (Bun.redis) stores.
Install
bun add @ninots/cache@^0.2.0Stores
| Store | Class | Notes |
|-------|-------|-------|
| array | ArrayStore | In-memory |
| file | FileStore | Filesystem JSON payloads |
| sqlite | SQLiteStore | bun:sqlite |
| redis | RedisStore | Inject Bun.redis / CacheRedisClient (no npm Redis package); flush is prefix-scoped |
import { RedisStore, createDefaultCacheRedisClient } from "@ninots/cache";
const store = new RedisStore(createDefaultCacheRedisClient(process.env.REDIS_URL), {
prefix: "ninots_cache_",
});
await store.put("user:1", { name: "Ada" }, 60);Version
0.2.0 — Sprint 24: Redis store via Bun.redis (SemVer minor in 0.y.z).
License
MIT
