add granular conf items for all memory caches
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
5c30d2b2b0
commit
568136296f
4 changed files with 85 additions and 12 deletions
|
@ -12,6 +12,7 @@ use crate::{services, Error, Result};
|
|||
|
||||
pub struct Service {
|
||||
pub db: &'static dyn Data,
|
||||
pub(crate) shorteventid_cache_capacity: usize,
|
||||
}
|
||||
|
||||
impl Service {
|
||||
|
@ -117,6 +118,15 @@ impl Service {
|
|||
"Auth chain stats",
|
||||
);
|
||||
|
||||
if full_auth_chain.len() > self.shorteventid_cache_capacity {
|
||||
warn!(
|
||||
"Room {room_id} requires cache size of {} but it is set to {}. Increase 'shorteventid_cache_capacity' \
|
||||
in your config file.",
|
||||
full_auth_chain.len(),
|
||||
self.shorteventid_cache_capacity,
|
||||
);
|
||||
}
|
||||
|
||||
Ok(full_auth_chain
|
||||
.into_iter()
|
||||
.filter_map(move |sid| services().rooms.short.get_eventid_from_short(sid).ok()))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue