mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 15:51:23 +01:00
add constructor for state accessor service
This commit is contained in:
parent
a083ff9200
commit
c6e2f8372c
2 changed files with 27 additions and 12 deletions
|
|
@ -133,25 +133,25 @@ impl Services {
|
|||
state: rooms::state::Service {
|
||||
db,
|
||||
},
|
||||
state_accessor: rooms::state_accessor::Service {
|
||||
state_accessor: rooms::state_accessor::Service::new(
|
||||
db,
|
||||
#[allow(
|
||||
clippy::as_conversions,
|
||||
clippy::cast_sign_loss,
|
||||
clippy::cast_possible_truncation
|
||||
)]
|
||||
server_visibility_cache: StdMutex::new(LruCache::new(
|
||||
(100.0 * config.cache_capacity_modifier) as usize,
|
||||
)),
|
||||
{
|
||||
(100.0 * config.cache_capacity_modifier) as usize
|
||||
},
|
||||
#[allow(
|
||||
clippy::as_conversions,
|
||||
clippy::cast_sign_loss,
|
||||
clippy::cast_possible_truncation
|
||||
)]
|
||||
user_visibility_cache: StdMutex::new(LruCache::new(
|
||||
(100.0 * config.cache_capacity_modifier) as usize,
|
||||
)),
|
||||
},
|
||||
{
|
||||
(100.0 * config.cache_capacity_modifier) as usize
|
||||
},
|
||||
),
|
||||
state_cache: rooms::state_cache::Service::new(db),
|
||||
state_compressor: rooms::state_compressor::Service {
|
||||
db,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue