mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 07:41:23 +01:00
make all caches individually configurable
Also: * Removes the `cache_capacity_modifier` option * Renames the `pdu_cache_capacity` option to `cache.pdu`
This commit is contained in:
parent
9fab7538a0
commit
1148c6004f
4 changed files with 65 additions and 110 deletions
|
|
@ -67,14 +67,7 @@ impl Services {
|
|||
alias: rooms::alias::Service::new(db),
|
||||
auth_chain: rooms::auth_chain::Service::new(
|
||||
db,
|
||||
#[allow(
|
||||
clippy::as_conversions,
|
||||
clippy::cast_sign_loss,
|
||||
clippy::cast_possible_truncation
|
||||
)]
|
||||
{
|
||||
(100_000.0 * config.cache_capacity_modifier) as usize
|
||||
},
|
||||
config.cache.auth_chain,
|
||||
),
|
||||
directory: db,
|
||||
edus: rooms::edus::Service {
|
||||
|
|
@ -91,89 +84,30 @@ impl Services {
|
|||
search: db,
|
||||
short: rooms::short::Service::new(
|
||||
db,
|
||||
#[allow(
|
||||
clippy::as_conversions,
|
||||
clippy::cast_sign_loss,
|
||||
clippy::cast_possible_truncation
|
||||
)]
|
||||
{
|
||||
(100_000.0 * config.cache_capacity_modifier) as usize
|
||||
},
|
||||
#[allow(
|
||||
clippy::as_conversions,
|
||||
clippy::cast_sign_loss,
|
||||
clippy::cast_possible_truncation
|
||||
)]
|
||||
{
|
||||
(100_000.0 * config.cache_capacity_modifier) as usize
|
||||
},
|
||||
#[allow(
|
||||
clippy::as_conversions,
|
||||
clippy::cast_sign_loss,
|
||||
clippy::cast_possible_truncation
|
||||
)]
|
||||
{
|
||||
(100_000.0 * config.cache_capacity_modifier) as usize
|
||||
},
|
||||
#[allow(
|
||||
clippy::as_conversions,
|
||||
clippy::cast_sign_loss,
|
||||
clippy::cast_possible_truncation
|
||||
)]
|
||||
{
|
||||
(100_000.0 * config.cache_capacity_modifier) as usize
|
||||
},
|
||||
config.cache.short_eventid,
|
||||
config.cache.eventid_short,
|
||||
config.cache.statekey_short,
|
||||
config.cache.short_statekey,
|
||||
),
|
||||
state: rooms::state::Service {
|
||||
db,
|
||||
},
|
||||
state_accessor: rooms::state_accessor::Service::new(
|
||||
db,
|
||||
#[allow(
|
||||
clippy::as_conversions,
|
||||
clippy::cast_sign_loss,
|
||||
clippy::cast_possible_truncation
|
||||
)]
|
||||
{
|
||||
(100.0 * config.cache_capacity_modifier) as usize
|
||||
},
|
||||
#[allow(
|
||||
clippy::as_conversions,
|
||||
clippy::cast_sign_loss,
|
||||
clippy::cast_possible_truncation
|
||||
)]
|
||||
{
|
||||
(100.0 * config.cache_capacity_modifier) as usize
|
||||
},
|
||||
config.cache.server_visibility,
|
||||
config.cache.user_visibility,
|
||||
),
|
||||
state_cache: rooms::state_cache::Service::new(db),
|
||||
state_compressor: rooms::state_compressor::Service::new(
|
||||
db,
|
||||
#[allow(
|
||||
clippy::as_conversions,
|
||||
clippy::cast_sign_loss,
|
||||
clippy::cast_possible_truncation
|
||||
)]
|
||||
{
|
||||
(100.0 * config.cache_capacity_modifier) as usize
|
||||
},
|
||||
),
|
||||
timeline: rooms::timeline::Service::new(
|
||||
db,
|
||||
config.pdu_cache_capacity,
|
||||
config.cache.state_info,
|
||||
),
|
||||
timeline: rooms::timeline::Service::new(db, config.cache.pdu),
|
||||
threads: rooms::threads::Service {
|
||||
db,
|
||||
},
|
||||
spaces: rooms::spaces::Service::new(
|
||||
#[allow(
|
||||
clippy::as_conversions,
|
||||
clippy::cast_sign_loss,
|
||||
clippy::cast_possible_truncation
|
||||
)]
|
||||
{
|
||||
(200.0 * config.cache_capacity_modifier) as usize
|
||||
},
|
||||
config.cache.roomid_spacechunk,
|
||||
),
|
||||
user: db,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue