From c4b2ce5266ac70108ab275c409f51e3455335139 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 7a4187ec..0d903483 100644 --- a/web3_proxy/src/rpcs/many.rs +++ b/web3_proxy/src/rpcs/many.rs @@ -97,14 +97,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) =