xpeditis2.0/apps/backend/src/infrastructure/cache/cache.module.ts
2025-10-27 20:54:01 +01:00

23 lines
474 B
TypeScript

/**
* Cache Module
*
* Provides Redis cache adapter as CachePort implementation
*/
import { Module, Global } from '@nestjs/common';
import { RedisCacheAdapter } from './redis-cache.adapter';
import { CACHE_PORT } from '../../domain/ports/out/cache.port';
@Global()
@Module({
providers: [
{
provide: CACHE_PORT,
useClass: RedisCacheAdapter,
},
RedisCacheAdapter,
],
exports: [CACHE_PORT, RedisCacheAdapter],
})
export class CacheModule {}