nestjs @CacheTTL error
-
NestJs @CacheTTL() not working이슈 기록 2023. 3. 12. 11:39
개발 버전 nestjs : 9 version cache-manager : 5 version 에러 발생 코드 import { CacheModule, Module } from '@nestjs/common'; ... @Module({ ... }) export class UserModule {} @CacheTTL(4) @Get() @UseInterceptors(CacheInterceptor) ... findAll( ... ) { ... } 에러 내용 @CacheTTl 데코레이터에 설정한 시간이 재대로 동작하지 않는다. 원인 네스트 9 버전은 cache-manager 5 버전과 재대로 호환되지 않음 해결 방법 cache-manager을 4 버전으로 다운그레이