move shorteventid_cache to service

This commit is contained in:
Charles Hall 2024-09-30 21:06:37 -07:00
parent 7563360bee
commit 47502d1f36
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
4 changed files with 45 additions and 30 deletions

View file

@ -45,6 +45,7 @@ pub(crate) struct Services {
}
impl Services {
#[allow(clippy::too_many_lines)]
pub(crate) fn build<
D: appservice::Data
+ pusher::Data
@ -93,7 +94,17 @@ impl Services {
db,
},
search: db,
short: rooms::short::Service::new(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
},
),
state: rooms::state::Service {
db,
},