mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-18 00:01:24 +01:00
move statekeyshort_cache to service
This commit is contained in:
parent
2b2b4169df
commit
190b788683
5 changed files with 79 additions and 64 deletions
|
|
@ -236,8 +236,6 @@ pub(crate) struct KeyValueDatabase {
|
|||
pub(super) senderkey_pusher: Arc<dyn KvTree>,
|
||||
|
||||
// Uncategorized trees
|
||||
pub(super) statekeyshort_cache:
|
||||
Mutex<LruCache<(StateEventType, String), ShortStateKey>>,
|
||||
pub(super) shortstatekey_cache:
|
||||
Mutex<LruCache<ShortStateKey, (StateEventType, String)>>,
|
||||
pub(super) our_real_users_cache:
|
||||
|
|
@ -471,14 +469,6 @@ impl KeyValueDatabase {
|
|||
shortstatekey_cache: Mutex::new(LruCache::new(
|
||||
(100_000.0 * config.cache_capacity_modifier) as usize,
|
||||
)),
|
||||
#[allow(
|
||||
clippy::as_conversions,
|
||||
clippy::cast_sign_loss,
|
||||
clippy::cast_possible_truncation
|
||||
)]
|
||||
statekeyshort_cache: Mutex::new(LruCache::new(
|
||||
(100_000.0 * config.cache_capacity_modifier) as usize,
|
||||
)),
|
||||
our_real_users_cache: RwLock::new(HashMap::new()),
|
||||
appservice_in_room_cache: RwLock::new(HashMap::new()),
|
||||
lasttimelinecount_cache: Mutex::new(HashMap::new()),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue