move appservice_in_room_cache to service

This commit is contained in:
Charles Hall 2024-10-08 15:41:17 -07:00
parent 9d62865b28
commit 107f4521e0
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
3 changed files with 39 additions and 40 deletions

View file

@ -4,7 +4,7 @@ use std::{
io::Write,
mem::size_of,
path::Path,
sync::{Arc, Mutex, RwLock},
sync::{Arc, Mutex},
};
use ruma::{
@ -233,8 +233,6 @@ pub(crate) struct KeyValueDatabase {
pub(super) senderkey_pusher: Arc<dyn KvTree>,
// Uncategorized trees
pub(super) appservice_in_room_cache:
RwLock<HashMap<OwnedRoomId, HashMap<String, bool>>>,
pub(super) lasttimelinecount_cache: Mutex<HashMap<OwnedRoomId, PduCount>>,
}
@ -454,7 +452,6 @@ impl KeyValueDatabase {
global: builder.open_tree("global")?,
server_signingkeys: builder.open_tree("server_signingkeys")?,
appservice_in_room_cache: RwLock::new(HashMap::new()),
lasttimelinecount_cache: Mutex::new(HashMap::new()),
};