From 0f4e14b153c1a9fdbdff8260878b06e8793df027 Mon Sep 17 00:00:00 2001 From: Andcool-Systems Date: Sat, 21 Dec 2024 00:30:33 +0300 Subject: [PATCH] 1-hour cache --- src/apis/apis.service.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/apis/apis.service.ts b/src/apis/apis.service.ts index 3f7fce3..0ac5278 100644 --- a/src/apis/apis.service.ts +++ b/src/apis/apis.service.ts @@ -31,7 +31,7 @@ export class APIService { if (response.status !== 200) return null; - await this.cacheManager.set(`repos:${username}`, JSON.stringify(response.data), 1000 * 60 * 60 * 12); + await this.cacheManager.set(`repos:${username}`, JSON.stringify(response.data), 1000 * 60 * 60); return response.data; } @@ -102,7 +102,7 @@ export class APIService { longest: longest_streak } - await this.cacheManager.set(`streak:${username}`, JSON.stringify(result), 1000 * 60 * 60 * 12); + await this.cacheManager.set(`streak:${username}`, JSON.stringify(result), 1000 * 60 * 60); return result; } @@ -119,7 +119,7 @@ export class APIService { return null; } - await this.cacheManager.set(`waka_global:${path}`, JSON.stringify(response.data), 1000 * 60 * 60 * 12); + await this.cacheManager.set(`waka_global:${path}`, JSON.stringify(response.data), 1000 * 60 * 60); return response.data; } @@ -136,7 +136,7 @@ export class APIService { return null; } - await this.cacheManager.set(`waka_langs:${path}`, JSON.stringify(response.data), 1000 * 60 * 60 * 12); + await this.cacheManager.set(`waka_langs:${path}`, JSON.stringify(response.data), 1000 * 60 * 60); return response.data; }