mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-18 16:21:24 +01:00
move lasttimelinecount_cache to service
This commit is contained in:
parent
107f4521e0
commit
ce7efc1eff
4 changed files with 41 additions and 65 deletions
|
|
@ -4,7 +4,7 @@ use std::{
|
|||
io::Write,
|
||||
mem::size_of,
|
||||
path::Path,
|
||||
sync::{Arc, Mutex},
|
||||
sync::Arc,
|
||||
};
|
||||
|
||||
use ruma::{
|
||||
|
|
@ -21,7 +21,6 @@ use crate::{
|
|||
rooms::{
|
||||
short::{ShortEventId, ShortStateHash, ShortStateKey},
|
||||
state_compressor::CompressedStateEvent,
|
||||
timeline::PduCount,
|
||||
},
|
||||
},
|
||||
services, utils, Config, Error, Result,
|
||||
|
|
@ -231,9 +230,6 @@ pub(crate) struct KeyValueDatabase {
|
|||
|
||||
// Trees "owned" by `self::key_value::pusher`
|
||||
pub(super) senderkey_pusher: Arc<dyn KvTree>,
|
||||
|
||||
// Uncategorized trees
|
||||
pub(super) lasttimelinecount_cache: Mutex<HashMap<OwnedRoomId, PduCount>>,
|
||||
}
|
||||
|
||||
impl KeyValueDatabase {
|
||||
|
|
@ -451,8 +447,6 @@ impl KeyValueDatabase {
|
|||
senderkey_pusher: builder.open_tree("senderkey_pusher")?,
|
||||
global: builder.open_tree("global")?,
|
||||
server_signingkeys: builder.open_tree("server_signingkeys")?,
|
||||
|
||||
lasttimelinecount_cache: Mutex::new(HashMap::new()),
|
||||
};
|
||||
|
||||
Ok(db)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue