mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-19 05:58:32 +03:00
Update src/utils/createMemoryCache.js
Co-authored-by: Ajay Ramachandran <dev@ajay.app>
This commit is contained in:
@@ -3,7 +3,7 @@ module.exports = function createMemoryCache(memoryFn, cacheTimeMs) {
|
||||
const cache = new Map();
|
||||
// holds the promises that are not fulfilled
|
||||
const promiseMemory = new Map();
|
||||
return function (...args) {
|
||||
return (...args) => {
|
||||
// create cacheKey by joining arguments as string
|
||||
const cacheKey = args.join('.');
|
||||
// check if promising is already running
|
||||
|
||||
Reference in New Issue
Block a user