mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2024-11-10 01:02:30 +01:00
Add ttl to in memory cache cache
This commit is contained in:
parent
5f8ef25d88
commit
e61f964d17
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue