[addon] fix availability ttl propagation

This commit is contained in:
TheBeastLT
2021-06-20 21:56:59 +02:00
parent 3e66db3717
commit 991065b4b6

View File

@@ -74,7 +74,7 @@ function cacheAvailabilityResults(results) {
const key = `${AVAILABILITY_KEY_PREFIX}:${infoHash}`; const key = `${AVAILABILITY_KEY_PREFIX}:${infoHash}`;
const value = results[infoHash]; const value = results[infoHash];
const ttl = value && value.length ? AVAILABILITY_TTL : AVAILABILITY_EMPTY_TTL; const ttl = value && value.length ? AVAILABILITY_TTL : AVAILABILITY_EMPTY_TTL;
memoryCache.set(key, value, ttl) memoryCache.set(key, value, { ttl })
}); });
return results; return results;
} }