fix: make CacheModule global for DI availability across all modules
This commit is contained in:
parent
f0a9a13d57
commit
fdb8b52e38
@ -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({
|
||||||
|
|||||||
@ -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],
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user