Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

732
Views
Pruebas de NestJs con CACHE_MANAGER inyectado

tengo algun servicio en el cual inyecte el CACHE_MANAGER en el constructor

 import { CACHE_MANAGER, Inject, Injectable } from '@nestjs/common'; import { Cache } from 'cache-manager'; ... export class ManagerService { constructor(@Inject(CACHE_MANAGER) private cacheManager: Cache) {} ... }

Eso me da un error cuando pruebo los módulos para importar esos servicios.

Nest can't resolve dependencies of the ManagerService (?). Please make sure that the argument CACHE_MANAGER at index [0] is available in the Web3ManagerService context.

Soy relativamente nuevo en NestJs, así que realmente no puedo encontrar la manera de resolverlo.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Para inyectar el proveedor del administrador de caché en CACHE_MANAGER , debe importar el módulo nestjs que crea este proveedor en el módulo que tiene ManagerService

 @Module({ imports: [CacheModule.register()], // <<<< providers: [ManagerService], }) export class AppModule {}

como muestra la documentación https://docs.nestjs.com/techniques/caching

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!