A configurable NestJS module for Redis integration built on ioredis. Version 1.0.12 is stable and supports NestJS versions 9, 10, and 11. It provides a RedisService with comprehensive Redis commands, static and async configuration via register/registerAsync, global module support, and a built-in caching interceptor for automatic method response caching with customizable TTL. Key differentiators include type safety (TypeScript types shipped), simplicity of setup, and the interceptor feature that reduces boilerplate for caching.
npm install nestjs-redis-clientNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to import RedisModule, configure it statically with global scope, and use RedisService to set and get a key with TTL.
Ensure RedisModule is imported with appropriate config and the interceptor is applied correctly via @UseInterceptors.
Install compatible versions: 'npm install @nestjs/common@^10 @nestjs/core@^10' (adjust to your NestJS version).
Stay updated with changelog; ioredis v5 deprecated certain options like retryStrategy.
Always use async/await or .then() when calling RedisService methods.
Run 'npm install nestjs-redis-client' and ensure tsconfig.json includes node_modules in types or skipLibCheck.
Use RedisModule.register({...}) or RedisModule.registerAsync({...}) in imports.Use import { RedisService } from 'nestjs-redis-client' and check the documentation for available methods; update to latest version.Ensure useFactory returns an object like { host: '...', port: 6379 }.