use rocksdb caches for a few of the lru_caches

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-04-08 01:29:52 -07:00 committed by June
parent fc44ba6ab3
commit 345be5ba5e
10 changed files with 133 additions and 192 deletions

View file

@ -12,7 +12,6 @@ use crate::{services, Error, Result};
pub struct Service {
pub db: &'static dyn Data,
pub(crate) shorteventid_cache_capacity: usize,
}
impl Service {
@ -117,15 +116,6 @@ 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()))