Add ttl to in memory cache cache

This commit is contained in:
Ajay 2024-02-08 14:37:01 -05:00
parent 5f8ef25d88
commit e61f964d17

View file

@ -67,7 +67,9 @@ const maxStoredTimes = 200;
const cache = config.redis.clientCacheSize ? new LRUCache<RedisCommandArgument, string>({
maxSize: config.redis.clientCacheSize,
sizeCalculation: (value) => value.length
sizeCalculation: (value) => value.length,
ttl: 1000 * 60 * 30,
ttlResolution: 1000 * 60 * 15
}) : null;
// For redis