From 166b0d810cd25b895560d50d00383a57e1269ad4 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Sun, 28 May 2023 09:38:51 -0700 Subject: [PATCH] remove cache on /status and /health for now --- web3_proxy/src/frontend/status.rs | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/web3_proxy/src/frontend/status.rs b/web3_proxy/src/frontend/status.rs index 632f2839..b7d69fee 100644 --- a/web3_proxy/src/frontend/status.rs +++ b/web3_proxy/src/frontend/status.rs @@ -31,12 +31,15 @@ pub async fn health( Extension(app): Extension>, Extension(cache): Extension>, ) -> impl IntoResponse { - let (code, content_type, body) = cache - .get_or_insert_async::(&ResponseCacheKey::Health, async move { - Ok(_health(app).await) - }) - .await - .expect("this cache get is infallible"); + // let (code, content_type, body) = cache + // .get_or_insert_async::(&ResponseCacheKey::Health, async move { + // Ok(_health(app).await) + // }) + // .await + // .expect("this cache get is infallible"); + + // TODO: cache this once new TTLs work + let (code, content_type, body) = _health(app).await; Response::builder() .status(code) @@ -115,12 +118,15 @@ pub async fn status( Extension(app): Extension>, Extension(cache): Extension>, ) -> impl IntoResponse { - let (code, content_type, body) = cache - .get_or_insert_async::(&ResponseCacheKey::Status, async move { - Ok(_status(app).await) - }) - .await - .expect("this cache get is infallible"); + // let (code, content_type, body) = cache + // .get_or_insert_async::(&ResponseCacheKey::Status, async move { + // Ok(_status(app).await) + // }) + // .await + // .expect("this cache get is infallible"); + + // TODO: cache this once new TTLs work + let (code, content_type, body) = _status(app).await; Response::builder() .status(code)