Reference
Complete API reference for NestJS RedisX core module and plugins.
Core Module
@nestjs-redisx/core is the foundation package that provides:
- RedisModule — NestJS module for Redis integration
- RedisService — High-level Redis operations wrapper
- Driver Abstraction — Switch between ioredis and node-redis
- Multi-Client Support — Manage multiple Redis connections
- Connection Types — Single, Cluster, and Sentinel configurations
- Health Monitoring — Automatic reconnection and health checks
- Plugin System — Extensible architecture for plugins
Installation
bash
npm install @nestjs-redisx/core ioredisbash
npm install @nestjs-redisx/core redisQuick Start
typescript
import { Module } from '@nestjs/common';
import { RedisModule } from '@nestjs-redisx/core';
@Module({
imports: [
RedisModule.forRoot({
clients: {
host: 'localhost',
port: 6379,
},
}),
],
})
export class AppModule {}Core Documentation
| Section | Description |
|---|---|
| Configuration | Complete configuration reference |
| RedisService | Service API documentation |
| Multiple Clients | Named client management |
| Connection Types | Single, Cluster, Sentinel |
| Health Monitoring | Health checks and reconnection |
| Decorators | @InjectRedis usage |
| Driver Abstraction | ioredis vs node-redis |
| Troubleshooting | Common issues and solutions |
Plugins
Self-contained feature modules for common Redis use cases.
| Plugin | Description |
|---|---|
| Cache | Two-tier caching with L1 memory and L2 Redis |
| Locks | Distributed locking with auto-renewal |
| Rate Limit | Multiple algorithms for API protection |
| Idempotency | Request deduplication with response replay |
| Streams | Redis Streams with consumer groups |
| Metrics | Prometheus metrics export |
| Tracing | OpenTelemetry distributed tracing |