From 991065b4b6e8cd5d0a96c8fbadece0a1cc5a5fef Mon Sep 17 00:00:00 2001 From: TheBeastLT Date: Sun, 20 Jun 2021 21:56:59 +0200 Subject: [PATCH] [addon] fix availability ttl propagation --- addon/lib/cache.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addon/lib/cache.js b/addon/lib/cache.js index d16eae8..3906a51 100644 --- a/addon/lib/cache.js +++ b/addon/lib/cache.js @@ -47,7 +47,7 @@ function initiateMemoryCache() { return cacheManager.caching({ store: 'memory', ttl: RESOLVED_URL_TTL, - max: Infinity// infinite LRU cache size + max: Infinity // infinite LRU cache size }); } @@ -74,7 +74,7 @@ function cacheAvailabilityResults(results) { const key = `${AVAILABILITY_KEY_PREFIX}:${infoHash}`; const value = results[infoHash]; const ttl = value && value.length ? AVAILABILITY_TTL : AVAILABILITY_EMPTY_TTL; - memoryCache.set(key, value, ttl) + memoryCache.set(key, value, { ttl }) }); return results; }