mirror of
https://github.com/girlbossceo/conduwuit.git
synced 2024-11-27 02:45:27 +00:00
add eventid_pdu database cf cache
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
b6d53e97a6
commit
9100af9974
|
@ -198,6 +198,10 @@ pub struct Config {
|
|||
#[serde(default = "default_eventidshort_cache_capacity")]
|
||||
pub eventidshort_cache_capacity: u32,
|
||||
|
||||
/// default: varies by system
|
||||
#[serde(default = "default_eventid_pdu_cache_capacity")]
|
||||
pub eventid_pdu_cache_capacity: u32,
|
||||
|
||||
/// default: varies by system
|
||||
#[serde(default = "default_shortstatekey_cache_capacity")]
|
||||
pub shortstatekey_cache_capacity: u32,
|
||||
|
@ -2040,6 +2044,8 @@ fn default_shorteventid_cache_capacity() -> u32 { parallelism_scaled_u32(50_000)
|
|||
|
||||
fn default_eventidshort_cache_capacity() -> u32 { parallelism_scaled_u32(25_000).saturating_add(100_000) }
|
||||
|
||||
fn default_eventid_pdu_cache_capacity() -> u32 { parallelism_scaled_u32(25_000).saturating_add(100_000) }
|
||||
|
||||
fn default_shortstatekey_cache_capacity() -> u32 { parallelism_scaled_u32(10_000).saturating_add(100_000) }
|
||||
|
||||
fn default_statekeyshort_cache_capacity() -> u32 { parallelism_scaled_u32(10_000).saturating_add(100_000) }
|
||||
|
|
|
@ -136,6 +136,14 @@ pub(crate) fn cf_options(
|
|||
cache_size(cfg, cfg.eventidshort_cache_capacity, 64)?,
|
||||
),
|
||||
|
||||
"eventid_pduid" => set_table_with_new_cache(
|
||||
&mut opts,
|
||||
cfg,
|
||||
cache,
|
||||
name,
|
||||
cache_size(cfg, cfg.eventid_pdu_cache_capacity, 64)?,
|
||||
),
|
||||
|
||||
"shorteventid_authchain" => {
|
||||
set_table_with_new_cache(
|
||||
&mut opts,
|
||||
|
|
Loading…
Reference in a new issue