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
v4
Darkangeel_hd 2 years ago
parent 58ac761098
commit 7c6307cb1e

@ -315,11 +315,11 @@ export const getRelatedAnimesMAL = async (mal_id: number) => {
JSON.stringify(relatedAnimes), JSON.stringify(relatedAnimes),
); );
/* After 2hrs expire the key. */ /* After 1hr expire the key. */
redisClient.expire( redisClient.expire(
`getRelatedMAL_${mal_id}`, `getRelatedMAL_${mal_id}`,
7200, 3600,
); );
} }

Loading…
Cancel
Save