@radzor/kv-store
Key-value store with TTL support. Operates in-memory by default with optional Redis backend via raw RESP protocol. Supports expiration callbacks and namespace isolation.
Storagev0.1.0typescriptpythonServerkvkey-valuestoreredisttlcachememoryby Radzor
Install
View source on GitHub →$npx radzor@latest add kv-store
⚠ Constraints: In-memory mode requires no dependencies and is lost on process restart. Redis mode uses raw RESP protocol over TCP (no npm packages). TTL is in milliseconds. Namespace prefixes are applied transparently — keys() returns unprefixed keys.
Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| mode | "memory" | "redis" | memory | Storage backend (default: memory). |
| redisUrl | string | — | Redis connection URL (required when mode is 'redis').REDIS_URL |
| namespace | string | — | Key prefix for namespace isolation (default: none). |
| defaultTtl | number | 0 | Default TTL in milliseconds (0 = no expiry, default: 0). |
mode"memory" | "redis"
Storage backend (default: memory).
default: memory
redisUrlstring