diff --git a/lib/utils/cache/redis.ts b/lib/utils/cache/redis.ts index ae40fe383..a3ba5850c 100644 --- a/lib/utils/cache/redis.ts +++ b/lib/utils/cache/redis.ts @@ -64,8 +64,8 @@ export default { } if (key) { if (maxAge !== config.cache.contentExpire) { - // Only set cacheTtlKey if maxAge !== contentExpire - clients.redisClient.set(getCacheTtlKey(key), value, 'EX', maxAge); + // intentionally store the cache ttl if it is not the default value + clients.redisClient.set(getCacheTtlKey(key), maxAge, 'EX', maxAge); } return clients.redisClient.set(key, value, 'EX', maxAge); // setMode: https://redis.io/commands/set }