use cache_capacity_modifier for spaces/hierarchy cache

Signed-off-by: strawberry <strawberry@pupbrain.dev>
This commit is contained in:
strawberry 2023-11-26 10:34:18 -05:00 committed by strawberry
parent 2dc1c1fdcb
commit dd544fad29

View file

@ -99,7 +99,9 @@ impl Services {
},
threads: rooms::threads::Service { db },
spaces: rooms::spaces::Service {
roomid_spacechunk_cache: Mutex::new(LruCache::new(200)),
roomid_spacechunk_cache: Mutex::new(LruCache::new(
(100.0 * config.conduit_cache_capacity_modifier) as usize,
)),
},
user: rooms::user::Service { db },
},