mirror of
https://github.com/TheBeastLT/torrentio-scraper.git
synced 2026-03-11 21:26:53 +00:00
[addon] fix availability ttl propagation
This commit is contained in:
parent
3e66db3717
commit
991065b4b6
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue