use rocksdb caches for a few of the lru_caches
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
fc44ba6ab3
commit
345be5ba5e
10 changed files with 133 additions and 192 deletions
|
@ -72,8 +72,6 @@ impl Services<'_> {
|
|||
},
|
||||
auth_chain: rooms::auth_chain::Service {
|
||||
db,
|
||||
shorteventid_cache_capacity: (f64::from(config.shorteventid_cache_capacity)
|
||||
* config.conduit_cache_capacity_modifier) as usize,
|
||||
},
|
||||
directory: rooms::directory::Service {
|
||||
db,
|
||||
|
|
|
@ -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()))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue