From 90fed885bc4a21026e05ea2ae48d2ddb72cd4f11 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Mon, 19 Sep 2022 23:09:31 +0000 Subject: [PATCH] add ttl to user_cache --- web3_proxy/src/app.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/web3_proxy/src/app.rs b/web3_proxy/src/app.rs index 436a5c82..26fe5605 100644 --- a/web3_proxy/src/app.rs +++ b/web3_proxy/src/app.rs @@ -351,6 +351,7 @@ impl Web3ProxyApp { // TODO: max_capacity from config let user_cache = Cache::builder() .max_capacity(10_000) + .time_to_live(Duration::from_secs(60)) .build_with_hasher(ahash::RandomState::new()); let app = Self {