From f73a4fd76d2e07d1bbae385d30d3eb4c64afd22b Mon Sep 17 00:00:00 2001 From: Rajkumar Dusad <32831684+rajkumardusad@users.noreply.github.com> Date: Mon, 27 Mar 2023 12:50:54 +0530 Subject: [PATCH] Update router.cjs --- src/router.cjs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/router.cjs b/src/router.cjs index 9a546c6..3f2dc8d 100644 --- a/src/router.cjs +++ b/src/router.cjs @@ -18,8 +18,12 @@ module.exports = class Router { this.#config.caseSensitive = true; } this.#config.host = options.host; - this.#pathCache = new LRUCache(); - this.#routeCache = new LRUCache(); + this.#pathCache = new LRUCache({ + maxLength: 250, + }); + this.#routeCache = new LRUCache({ + maxLength: 250, + }); } checkout(path, ...callbacks) {