From a59d65164da25b9040a95459100a190635137dd8 Mon Sep 17 00:00:00 2001 From: Rajkumar Dusad <32831684+rajkumardusad@users.noreply.github.com> Date: Mon, 27 Mar 2023 12:51:26 +0530 Subject: [PATCH] Update router.mjs --- src/router.mjs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/router.mjs b/src/router.mjs index bf97987..6467115 100644 --- a/src/router.mjs +++ b/src/router.mjs @@ -18,8 +18,12 @@ export default 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) {