From f0a9f0307654d8cd6ded38f6f86abfe1fbbd4a48 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Wed, 7 Jun 2023 10:57:01 -0700 Subject: [PATCH] smaller caches --- web3_proxy/src/rpcs/many.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web3_proxy/src/rpcs/many.rs b/web3_proxy/src/rpcs/many.rs index 4ee3aadc..9c8fd5c7 100644 --- a/web3_proxy/src/rpcs/many.rs +++ b/web3_proxy/src/rpcs/many.rs @@ -98,14 +98,14 @@ impl Web3Rpcs { // TODO: actual weighter on this // TODO: time_to_idle instead? let blocks_by_hash: BlocksByHashCache = Arc::new( - CacheWithTTL::new("blocks_by_hash", 10_000, Duration::from_secs(30 * 60)).await, + CacheWithTTL::new("blocks_by_hash", 1_000, Duration::from_secs(30 * 60)).await, ); // all block numbers are the same size, so no need for weigher // TODO: limits from config // TODO: time_to_idle instead? let blocks_by_number = Arc::new( - CacheWithTTL::new("blocks_by_number", 10_000, Duration::from_secs(30 * 60)).await, + CacheWithTTL::new("blocks_by_number", 1_000, Duration::from_secs(30 * 60)).await, ); let (watch_consensus_rpcs_sender, consensus_connections_watcher) =