From 0e22528099c1160b45669c091b0788841c501f85 Mon Sep 17 00:00:00 2001 From: Martin Stefcek Date: Wed, 28 Feb 2024 18:38:39 +0400 Subject: [PATCH] feat: set the inner cache limit via env --- cache.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cache.js b/cache.js index c5a0f8b..90b91ee 100644 --- a/cache.js +++ b/cache.js @@ -1,5 +1,5 @@ class Cache { - constructor(limit = 1000) { + constructor(limit) { this.limit = limit; this.cache = new Map(); } @@ -27,5 +27,7 @@ class Cache { } } -var cache = new Cache(); +var cache = new Cache( + +process.env.TARI_EXPLORER_OLD_BLOCKS_CACHE_SETTINGS || 1000 +); module.exports = cache;