mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-08 04:27:09 +03:00
Add ttl to in memory cache cache
This commit is contained in:
@@ -67,7 +67,9 @@ const maxStoredTimes = 200;
|
|||||||
|
|
||||||
const cache = config.redis.clientCacheSize ? new LRUCache<RedisCommandArgument, string>({
|
const cache = config.redis.clientCacheSize ? new LRUCache<RedisCommandArgument, string>({
|
||||||
maxSize: config.redis.clientCacheSize,
|
maxSize: config.redis.clientCacheSize,
|
||||||
sizeCalculation: (value) => value.length
|
sizeCalculation: (value) => value.length,
|
||||||
|
ttl: 1000 * 60 * 30,
|
||||||
|
ttlResolution: 1000 * 60 * 15
|
||||||
}) : null;
|
}) : null;
|
||||||
|
|
||||||
// For redis
|
// For redis
|
||||||
|
|||||||
Reference in New Issue
Block a user