remove cache on /status and /health for now
This commit is contained in:
parent
7cb07cc49f
commit
166b0d810c
|
@ -31,12 +31,15 @@ pub async fn health(
|
||||||
Extension(app): Extension<Arc<Web3ProxyApp>>,
|
Extension(app): Extension<Arc<Web3ProxyApp>>,
|
||||||
Extension(cache): Extension<Arc<ResponseCache>>,
|
Extension(cache): Extension<Arc<ResponseCache>>,
|
||||||
) -> impl IntoResponse {
|
) -> impl IntoResponse {
|
||||||
let (code, content_type, body) = cache
|
// let (code, content_type, body) = cache
|
||||||
.get_or_insert_async::<Infallible, _>(&ResponseCacheKey::Health, async move {
|
// .get_or_insert_async::<Infallible, _>(&ResponseCacheKey::Health, async move {
|
||||||
Ok(_health(app).await)
|
// Ok(_health(app).await)
|
||||||
})
|
// })
|
||||||
.await
|
// .await
|
||||||
.expect("this cache get is infallible");
|
// .expect("this cache get is infallible");
|
||||||
|
|
||||||
|
// TODO: cache this once new TTLs work
|
||||||
|
let (code, content_type, body) = _health(app).await;
|
||||||
|
|
||||||
Response::builder()
|
Response::builder()
|
||||||
.status(code)
|
.status(code)
|
||||||
|
@ -115,12 +118,15 @@ pub async fn status(
|
||||||
Extension(app): Extension<Arc<Web3ProxyApp>>,
|
Extension(app): Extension<Arc<Web3ProxyApp>>,
|
||||||
Extension(cache): Extension<Arc<ResponseCache>>,
|
Extension(cache): Extension<Arc<ResponseCache>>,
|
||||||
) -> impl IntoResponse {
|
) -> impl IntoResponse {
|
||||||
let (code, content_type, body) = cache
|
// let (code, content_type, body) = cache
|
||||||
.get_or_insert_async::<Infallible, _>(&ResponseCacheKey::Status, async move {
|
// .get_or_insert_async::<Infallible, _>(&ResponseCacheKey::Status, async move {
|
||||||
Ok(_status(app).await)
|
// Ok(_status(app).await)
|
||||||
})
|
// })
|
||||||
.await
|
// .await
|
||||||
.expect("this cache get is infallible");
|
// .expect("this cache get is infallible");
|
||||||
|
|
||||||
|
// TODO: cache this once new TTLs work
|
||||||
|
let (code, content_type, body) = _status(app).await;
|
||||||
|
|
||||||
Response::builder()
|
Response::builder()
|
||||||
.status(code)
|
.status(code)
|
||||||
|
|
Loading…
Reference in New Issue