From 51808b13b4b00c3a1c417c826318be9b11613c7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C5=ABdolfs=20O=C5=A1i=C5=86=C5=A1?= Date: Thu, 25 Aug 2022 14:44:17 +0200 Subject: [PATCH] Add missing `max` attribute to cache call MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This gets rid of the UnboundedCacheWarning. Signed-off-by: Rūdolfs Ošiņš --- src/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.ts b/src/utils.ts index 1884ddc9b..29c9e5a13 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -555,7 +555,7 @@ export const getRpcMethod = cache.cached( return await config.provider.send(method, props); }, (method, props) => JSON.stringify([method, props]), - { ttl: 2 * 60 * 1000 } + { ttl: 2 * 60 * 1000, max: 1000 } ); // Check whether the given path has a markdown file extension.