Files
zod-backend/src/common/modules/cache/cache.module.ts
Abdalhamid Alhamad 8112fb81a2 feat: logout
2024-12-19 16:50:39 +03:00

19 lines
481 B
TypeScript

import { Global, Module } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { buildKeyvOptions } from '~/core/module-options';
import { CacheService } from './services';
@Module({
providers: [
{
provide: 'CACHE_INSTANCE',
useFactory: (config: ConfigService) => buildKeyvOptions(config),
inject: [ConfigService],
},
CacheService,
],
exports: ['CACHE_INSTANCE', CacheService],
})
@Global()
export class CacheModule {}