mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2026-01-30 14:20:50 +03:00
Update src/utils/createMemoryCache.js
Co-authored-by: Ajay Ramachandran <dev@ajay.app>
This commit is contained in:
@@ -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('.');
|
||||
|
||||
Reference in New Issue
Block a user