From 9fab7538a0779d58aaa7940e3f6db8bfddd497d8 Mon Sep 17 00:00:00 2001 From: Charles Hall Date: Tue, 8 Oct 2024 16:19:30 -0700 Subject: [PATCH] scale roomid_spacechunk_cache by modifier Not scaling this was probably unintentional. --- src/service.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/service.rs b/src/service.rs index 04088773..56a1c8a6 100644 --- a/src/service.rs +++ b/src/service.rs @@ -165,7 +165,16 @@ impl Services { threads: rooms::threads::Service { db, }, - spaces: rooms::spaces::Service::new(200), + 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 + }, + ), user: db, }, transaction_ids: db,