fix: make CacheModule global for DI availability across all modules

This commit is contained in:
Sergey Krylov 2026-06-13 19:05:09 +03:00
parent f0a9a13d57
commit fdb8b52e38
2 changed files with 2 additions and 3 deletions

View File

@ -1,7 +1,8 @@
import { Module } from '@nestjs/common'; import { Global, Module } from '@nestjs/common';
import { CacheModule as NestCacheModule } from '@nestjs/cache-manager'; import { CacheModule as NestCacheModule } from '@nestjs/cache-manager';
import { CacheService } from './cache.service'; import { CacheService } from './cache.service';
@Global()
@Module({ @Module({
imports: [ imports: [
NestCacheModule.register({ NestCacheModule.register({

View File

@ -1,10 +1,8 @@
import { Module } from '@nestjs/common'; import { Module } from '@nestjs/common';
import { CacheModule } from '../cache/cache.module';
import { SharesController } from './shares.controller'; import { SharesController } from './shares.controller';
import { SharesService } from './shares.service'; import { SharesService } from './shares.service';
@Module({ @Module({
imports: [CacheModule],
controllers: [SharesController], controllers: [SharesController],
providers: [SharesService], providers: [SharesService],
exports: [SharesService], exports: [SharesService],