Self-hosted Redis cache adapters for Drizzle ORM (version 0.1.0) providing connection-aware caching with ioredis for Node.js and Bun native Redis client. Supports configurable TTL, table-level invalidation via Redis Sets, and explicit or automatic caching strategies. Designed as a lightweight alternative to Upstash for teams running their own Redis. Ships TypeScript types, requires drizzle-orm >=0.45 and ioredis >=5.0 (Node.js). Released monthly with focus on stability.
npm install drizzle-redis-cacheNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Sets up a Drizzle ORM instance with IoRedisCache using ioredis and PostgreSQL, performs a cached query, and handles graceful shutdown.
Use import() or switch to ESM module resolution (type: module in package.json).
Use IoRedisCache for Node.js with ioredis; use BunRedisCache for Bun without ioredis.
Consider using 'explicit' strategy and opt-in with $withCache() for fine-grained control.
Always import from the specific subpath matching your runtime.
Upgrade Node.js to 20+ or use Bun 1.0+.
Refactor to use dynamic import: const { IoRedisCache } = await import('drizzle-redis-cache/ioredis');Ensure you use IoRedisCache with ioredis on Node.js, or BunRedisCache with Bun's built-in redis.
Update to latest version and ensure bundler supports package.json exports field (e.g., Webpack >=5, Vite, Rollup).