diff --git a/web3_proxy/src/frontend/mod.rs b/web3_proxy/src/frontend/mod.rs index 3032f271..882dcd45 100644 --- a/web3_proxy/src/frontend/mod.rs +++ b/web3_proxy/src/frontend/mod.rs @@ -56,7 +56,7 @@ pub async fn serve( let response_cache: ResponseCache = CacheBuilder::new(response_cache_size as u64) .name("frontend_response") - .time_to_live(Duration::from_secs(1)) + .time_to_live(Duration::from_millis(100)) .build(); // TODO: read config for if fastest/versus should be available publicly. default off diff --git a/web3_proxy/src/frontend/status.rs b/web3_proxy/src/frontend/status.rs index 6ef5d8c5..e9d3dba9 100644 --- a/web3_proxy/src/frontend/status.rs +++ b/web3_proxy/src/frontend/status.rs @@ -80,7 +80,7 @@ pub async fn health( Extension(cache): Extension>, ) -> Result { let (code, content_type, body) = timeout( - Duration::from_secs(3), + Duration::from_secs(1), cache.get_with(ResponseCacheKey::Health, async move { _health(app).await }), ) .await?; @@ -117,7 +117,7 @@ pub async fn backups_needed( Extension(cache): Extension>, ) -> Result { let (code, content_type, body) = timeout( - Duration::from_secs(3), + Duration::from_secs(1), cache.get_with(ResponseCacheKey::BackupsNeeded, async move { _backups_needed(app).await }), @@ -168,7 +168,7 @@ pub async fn status( Extension(cache): Extension>, ) -> Result { let (code, content_type, body) = timeout( - Duration::from_secs(3), + Duration::from_secs(1), cache.get_with(ResponseCacheKey::Status, async move { _status(app).await }), ) .await?;