Skip to content

v0.39.0 — Redis integration

Choose a tag to compare

@tshafer tshafer released this 11 Jul 06:22
· 121 commits to main since this release

A Redis integration on a pluggable RedisConnection driver — the core imports no client, so it runs on Node and the edge.

  • setRedis(driver) then redis(): get / set (with { ex } / { px } TTL) / del / exists / incr / decr / incrBy / expire / ttl / keys / flushAll, plus getJson / setJson and a remember read-through cache.
  • MemoryRedis — a full in-memory, TTL-aware driver and the default, so redis() works in tests with no setup. Point it at Upstash (fetch), ioredis, or node-redis in production (Upstash adapter example in the docs).
  • redisStore() adapts the client into a CacheStore, so the cache can be Redis-backed (shared across instances).

234 tests; type-checked doc examples. See docs/redis.md.