From 18d51b2f6f36cadf47ca17bddfa62abf33da37cd Mon Sep 17 00:00:00 2001 From: DIYgod Date: Thu, 22 Nov 2018 15:45:42 +0800 Subject: [PATCH] compatible with lru v5.x --- middleware/lru-cache.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/middleware/lru-cache.js b/middleware/lru-cache.js index 88f702cd5..c777b02e2 100644 --- a/middleware/lru-cache.js +++ b/middleware/lru-cache.js @@ -14,7 +14,7 @@ module.exports = function(options = {}) { ignoreQuery = false, } = options; - const memoryCache = lru({ + const memoryCache = new lru({ maxAge: expire * 1000, max: maxLength, });