mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2024-11-10 09:07:47 +01:00
Update src/utils/createMemoryCache.js
Co-authored-by: Ajay Ramachandran <dev@ajay.app>
This commit is contained in:
parent
25b91af8bc
commit
fb7ff50feb
1 changed files with 2 additions and 2 deletions
|
@ -1,8 +1,8 @@
|
|||
module.exports = function createMemoryCache(memoryFn, cacheTimeMs) {
|
||||
// holds the promise results
|
||||
const cache = new Map;
|
||||
const cache = new Map();
|
||||
// holds the promises that are not fulfilled
|
||||
const promiseMemory = new Map;
|
||||
const promiseMemory = new Map();
|
||||
return function (...args) {
|
||||
// create cacheKey by joining arguments as string
|
||||
const cacheKey = args.join('.');
|
||||
|
|
Loading…
Reference in a new issue