Clean successor to V3 (forge: lilith/atlilith). Seeded from local Mac working tree at ~/Code/@projects/@cocottetech/. node_modules and build artifacts excluded via .gitignore. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
22 lines
617 B
TypeScript
22 lines
617 B
TypeScript
import { Global, Module } from '@nestjs/common';
|
|
import { ConfigService } from '@nestjs/config';
|
|
import Redis from 'ioredis';
|
|
|
|
import { buildRedisOptions, REDIS_PUB, RedisLifecycle } from '../config/redis.config.js';
|
|
|
|
import { CacheInvalidateService } from './cache-invalidate.service.js';
|
|
|
|
@Global()
|
|
@Module({
|
|
providers: [
|
|
{
|
|
provide: REDIS_PUB,
|
|
inject: [ConfigService],
|
|
useFactory: (config: ConfigService): Redis => new Redis(buildRedisOptions(config)),
|
|
},
|
|
RedisLifecycle,
|
|
CacheInvalidateService,
|
|
],
|
|
exports: [CacheInvalidateService],
|
|
})
|
|
export class CacheInvalidateModule {}
|