remove cache on backups needed, too

This commit is contained in:
Bryan Stitt 2023-05-28 09:39:24 -07:00
parent 166b0d810c
commit 4597967def

View File

@ -68,12 +68,15 @@ pub async fn backups_needed(
Extension(app): Extension<Arc<Web3ProxyApp>>,
Extension(cache): Extension<Arc<ResponseCache>>,
) -> impl IntoResponse {
let (code, content_type, body) = cache
.get_or_insert_async::<Infallible, _>(&ResponseCacheKey::BackupsNeeded, async move {
Ok(_backups_needed(app).await)
})
.await
.expect("this cache get is infallible");
// let (code, content_type, body) = cache
// .get_or_insert_async::<Infallible, _>(&ResponseCacheKey::BackupsNeeded, async move {
// Ok(_backups_needed(app).await)
// })
// .await
// .expect("this cache get is infallible");
// TODO: cache this once new TTLs work
let (code, content_type, body) = _backups_needed(app).await;
Response::builder()
.status(code)