no limits on rpc_secret_key_cache and user_balance_cache
This commit is contained in:
parent
766e1939d5
commit
cb5c1c6582
@ -307,13 +307,13 @@ impl Web3ProxyApp {
|
||||
// if there is no database of users, there will be no keys and so this will be empty
|
||||
// TODO: max_capacity from config
|
||||
// TODO: ttl from config
|
||||
let rpc_secret_key_cache = CacheBuilder::new(10_000)
|
||||
let rpc_secret_key_cache = Cache::builder()
|
||||
.name("rpc_secret_key")
|
||||
.time_to_live(Duration::from_secs(600))
|
||||
.build();
|
||||
|
||||
// TODO: TTL left low, this could also be a solution instead of modifiying the cache, that may be disgusting across threads / slow anyways
|
||||
let user_balance_cache: UserBalanceCache = CacheBuilder::new(10_000)
|
||||
let user_balance_cache: UserBalanceCache = Cache::builder()
|
||||
.name("user_balance")
|
||||
.time_to_live(Duration::from_secs(600))
|
||||
.build()
|
||||
|
@ -299,6 +299,8 @@ pub async fn serve(
|
||||
// 404 for any unknown routes
|
||||
.fallback(errors::handler_404);
|
||||
|
||||
// TODO: https://docs.rs/tower-http/latest/tower_http/propagate_header/index.html
|
||||
|
||||
let server_builder = if let Some(listener) = ListenFd::from_env().take_tcp_listener(0)? {
|
||||
// use systemd socket magic for no downtime deploys
|
||||
let addr = listener.local_addr()?;
|
||||
|
Loading…
Reference in New Issue
Block a user