fix(cache): store cache TTL (#17044)
This commit is contained in:
Vendored
+2
-2
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user