Skip to content

Commit

Permalink
fix: cache-manager ttl
Browse files Browse the repository at this point in the history
cache-manager 의 버전이 4에서 5로 올라가며 ttl의 단위가 seconds -> milliseconds 로 바뀌어 변경하였습니다.
  • Loading branch information
niamu01 committed Dec 6, 2023
1 parent 6022181 commit 06fea90
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/statistics/statictics.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/tag-log-v2/tag-log-v2.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 06fea90

Please sign in to comment.