mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-19 05:48:31 +00:00
Add cache for parallel HTTP requests (#4879)
This commit is contained in:
@@ -821,6 +821,17 @@ pub fn cli_app<'a, 'b>() -> App<'a, 'b> {
|
||||
.takes_value(true)
|
||||
.default_value("0")
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("parallel-state-cache-size")
|
||||
.long("parallel-state-cache-size")
|
||||
.value_name("N")
|
||||
.help("Set the size of the cache used to de-duplicate requests for the same \
|
||||
state. This cache is additional to other state caches within Lighthouse \
|
||||
and should be kept small unless a large number of parallel requests for \
|
||||
different states are anticipated.")
|
||||
.takes_value(true)
|
||||
.default_value("2")
|
||||
)
|
||||
|
||||
/*
|
||||
* Misc.
|
||||
|
||||
@@ -391,6 +391,11 @@ pub fn get_config<E: EthSpec>(
|
||||
if let Some(state_cache_size) = clap_utils::parse_optional(cli_args, "state-cache-size")? {
|
||||
client_config.store.state_cache_size = state_cache_size;
|
||||
}
|
||||
if let Some(parallel_state_cache_size) =
|
||||
clap_utils::parse_optional(cli_args, "parallel-state-cache-size")?
|
||||
{
|
||||
client_config.chain.parallel_state_cache_size = parallel_state_cache_size;
|
||||
}
|
||||
if let Some(diff_buffer_cache_size) =
|
||||
clap_utils::parse_optional(cli_args, "diff-buffer-cache-size")?
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user