mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-19 14:09:06 +03:00
Don't cache when cacheTimeMs is NaN
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
module.exports = function createMemoryCache(memoryFn, cacheTimeMs) {
|
||||
if (isNaN(cacheTimeMs)) cacheTimeMs = 0;
|
||||
|
||||
// holds the promise results
|
||||
const cache = new Map();
|
||||
// holds the promises that are not fulfilled
|
||||
|
||||
Reference in New Issue
Block a user