Revert "try no cache?"

This reverts commit ff09ec73a44fc07304d02968d5e09eb3719dab9e.
This commit is contained in:
Bryan Stitt 2022-05-13 17:42:54 +00:00
parent ff09ec73a4
commit 57fc8160ca

@ -261,7 +261,6 @@ impl Web3ProxyApp {
continue;
}
/*
// TODO: building this cache key is slow and its large, but i don't see a better way right now
// TODO: inspect the params and see if a block is specified. if so, use that block number instead of current_block
// TODO: move this to a helper function. have it be a lot smarter
@ -277,7 +276,6 @@ impl Web3ProxyApp {
// TODO: return a reference in the other places so that this works without a clone?
return Ok(cached.to_owned());
}
*/
// TODO: what allowed lag?
match balanced_rpcs.next_upstream_server().await {
@ -299,7 +297,6 @@ impl Web3ProxyApp {
error: None,
};
/*
// TODO: small race condidition here. parallel requests with the same query will both be saved to the cache
// TODO: try_write is unlikely to get the lock. i think instead we should spawn another task for caching
if let Ok(mut response_cache) = self.response_cache.try_write()
@ -311,7 +308,6 @@ impl Web3ProxyApp {
response_cache.pop_front();
}
}
*/
response
}