move our_real_users_cache to service

This commit is contained in:
Charles Hall 2024-10-08 15:21:07 -07:00
parent d3b62e598d
commit 9d62865b28
No known key found for this signature in database
GPG key ID: 7B8E0645816E07CF
5 changed files with 56 additions and 47 deletions

View file

@ -10,7 +10,7 @@ use std::{
use ruma::{
events::{push_rules::PushRulesEvent, GlobalAccountDataEventType},
push::Ruleset,
EventId, OwnedRoomId, OwnedUserId, RoomId, UserId,
EventId, OwnedRoomId, RoomId, UserId,
};
use tracing::{debug, error, info, info_span, warn, Instrument};
@ -233,8 +233,6 @@ pub(crate) struct KeyValueDatabase {
pub(super) senderkey_pusher: Arc<dyn KvTree>,
// Uncategorized trees
pub(super) our_real_users_cache:
RwLock<HashMap<OwnedRoomId, Arc<HashSet<OwnedUserId>>>>,
pub(super) appservice_in_room_cache:
RwLock<HashMap<OwnedRoomId, HashMap<String, bool>>>,
pub(super) lasttimelinecount_cache: Mutex<HashMap<OwnedRoomId, PduCount>>,
@ -456,7 +454,6 @@ impl KeyValueDatabase {
global: builder.open_tree("global")?,
server_signingkeys: builder.open_tree("server_signingkeys")?,
our_real_users_cache: RwLock::new(HashMap::new()),
appservice_in_room_cache: RwLock::new(HashMap::new()),
lasttimelinecount_cache: Mutex::new(HashMap::new()),
};