From 20a3bdcd7068d0441a2004f139b421766569ba22 Mon Sep 17 00:00:00 2001 From: Hernan Calabrese Date: Sat, 24 Jul 2021 17:26:56 -0300 Subject: [PATCH] Fixes issue #171 --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 344259b..771a8ec 100644 --- a/index.js +++ b/index.js @@ -516,7 +516,8 @@ exports.parse = function parse(userAgent, jsAgent) { * @api public */ var lruCache = require('lru-cache'); -var LRU = new lruCache(5000); +var options = {max: 5000} +var LRU = new lruCache(options); exports.lookup = function lookup(userAgent, jsAgent) { var key = (userAgent || '')+(jsAgent || '') , cached = LRU.get(key);