From 7c6307cb1ec0f13c8557da03d84a90f4cf7d9d06 Mon Sep 17 00:00:00 2001 From: Darkangeel_hd Date: Fri, 14 Apr 2023 23:57:43 +0200 Subject: [PATCH] Expire getRelatedMAL_* faster TTL set to 1h Also, forgot to mention on last commit that we changed the key name to a more friendly one, using the mal_id now. As the relation between mal_id and its content is 1:1 collisions are not possible That way is easier to identify on the db --- src/utils/util.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/util.ts b/src/utils/util.ts index 3bccc9f..544abf8 100644 --- a/src/utils/util.ts +++ b/src/utils/util.ts @@ -315,11 +315,11 @@ export const getRelatedAnimesMAL = async (mal_id: number) => { JSON.stringify(relatedAnimes), ); - /* After 2hrs expire the key. */ + /* After 1hr expire the key. */ redisClient.expire( `getRelatedMAL_${mal_id}`, - 7200, + 3600, ); }