mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2024-11-10 01:02:30 +01:00
Count invalidation only on successful delete
This commit is contained in:
parent
e61f964d17
commit
c478546128
1 changed files with 3 additions and 3 deletions
|
@ -306,9 +306,9 @@ async function setupCacheClientListener(cacheClient: RedisClientType,
|
|||
cacheConnectionClientId = String(await cacheClient.clientId());
|
||||
|
||||
cacheClient.subscribe("__redis__:invalidate", (messages) => {
|
||||
cache.delete(messages?.[0]);
|
||||
|
||||
lastInvalidation = Date.now();
|
||||
if (cache.delete(messages?.[0])) {
|
||||
lastInvalidation = Date.now();
|
||||
}
|
||||
}).catch(Logger.error);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue