move remaining runtime caches into their respective service
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
e1d1dac95e
commit
473b29d524
12 changed files with 108 additions and 85 deletions
|
@ -441,4 +441,17 @@ impl Service {
|
|||
|
||||
Ok(servers)
|
||||
}
|
||||
|
||||
pub fn get_appservice_in_room_cache_usage(&self) -> (usize, usize) {
|
||||
let cache = self.db.appservice_in_room_cache.read().expect("locked");
|
||||
(cache.len(), cache.capacity())
|
||||
}
|
||||
|
||||
pub fn clear_appservice_in_room_cache(&self) {
|
||||
self.db
|
||||
.appservice_in_room_cache
|
||||
.write()
|
||||
.expect("locked")
|
||||
.clear();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue