From 06fea90e11b65d6bf47841caf02e7fbdbea004ec Mon Sep 17 00:00:00 2001 From: niamu01 Date: Thu, 7 Dec 2023 02:04:03 +0900 Subject: [PATCH] fix: cache-manager ttl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cache-manager 의 버전이 4에서 5로 올라가며 ttl의 단위가 seconds -> milliseconds 로 바뀌어 변경하였습니다. --- src/statistics/statictics.controller.ts | 2 +- src/tag-log-v2/tag-log-v2.controller.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/statistics/statictics.controller.ts b/src/statistics/statictics.controller.ts index fe93a3b..726bbcd 100644 --- a/src/statistics/statictics.controller.ts +++ b/src/statistics/statictics.controller.ts @@ -44,7 +44,7 @@ export class StatisticsController { ); if (rtn === undefined) { rtn = await this.statisticsService.getCadetPerCluster(2); - await this.cacheManager.set('getCadetPerCluster', rtn, 60); + await this.cacheManager.set('getCadetPerCluster', rtn, 60000); } return rtn; } diff --git a/src/tag-log-v2/tag-log-v2.controller.ts b/src/tag-log-v2/tag-log-v2.controller.ts index 42a155a..ef7f39b 100644 --- a/src/tag-log-v2/tag-log-v2.controller.ts +++ b/src/tag-log-v2/tag-log-v2.controller.ts @@ -181,7 +181,7 @@ export class TagLogController { await this.cacheManager.get('getCadetPerCluster'); if (cadetPerCluster === undefined) { cadetPerCluster = await this.statisticsService.getCadetPerCluster(2); - await this.cacheManager.set('getCadetPerCluster', cadetPerCluster, 60); + await this.cacheManager.set('getCadetPerCluster', cadetPerCluster, 60000); } const gaepo = +cadetPerCluster.find((v) => v.cluster === 'GAEPO')?.cadet; const seocho = +cadetPerCluster.find((v) => v.cluster === 'SEOCHO')?.cadet;