From 10118b004f39e95800abb1cf00a807ff51eed6c6 Mon Sep 17 00:00:00 2001 From: Genghis Yang Date: Sun, 20 Mar 2022 23:06:41 +0800 Subject: [PATCH] fix(core): MEMORY_MAX should be an integer (#9352) --- lib/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/config.js b/lib/config.js index 73135c26b..cd0146551 100644 --- a/lib/config.js +++ b/lib/config.js @@ -50,7 +50,7 @@ const calculateValue = () => { contentExpire: parseInt(envs.CACHE_CONTENT_EXPIRE) || 1 * 60 * 60, // 不变内容缓存时间,单位为秒 }, memory: { - max: envs.MEMORY_MAX || Math.pow(2, 8), // The maximum number of items that remain in the cache. This must be a positive finite intger. + max: parseInt(envs.MEMORY_MAX) || Math.pow(2, 8), // The maximum number of items that remain in the cache. This must be a positive finite intger. // https://github.com/isaacs/node-lru-cache#options }, redis: {