diff --git a/lib/parsers/parser_cache.js b/lib/parsers/parser_cache.js index 0eb577703c..d85fabecce 100644 --- a/lib/parsers/parser_cache.js +++ b/lib/parsers/parser_cache.js @@ -2,7 +2,7 @@ const LRU = require('lru-cache').default; -const parserCache = new LRU({ +let parserCache = new LRU({ max: 15000, }); @@ -51,7 +51,7 @@ function getParser(type, fields, options, config, compiler) { } function setMaxCache(max) { - parserCache.max = max; + parserCache = new LRU({ max }); } function clearCache() {