mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 15:51:23 +01:00
move eventidshort_cache to service
This commit is contained in:
parent
095ee483ac
commit
2b2b4169df
5 changed files with 49 additions and 39 deletions
|
|
@ -13,7 +13,7 @@ use ruma::{
|
|||
push_rules::PushRulesEvent, GlobalAccountDataEventType, StateEventType,
|
||||
},
|
||||
push::Ruleset,
|
||||
EventId, OwnedEventId, OwnedRoomId, OwnedUserId, RoomId, UserId,
|
||||
EventId, OwnedRoomId, OwnedUserId, RoomId, UserId,
|
||||
};
|
||||
use tracing::{debug, error, info, info_span, warn, Instrument};
|
||||
|
||||
|
|
@ -236,7 +236,6 @@ pub(crate) struct KeyValueDatabase {
|
|||
pub(super) senderkey_pusher: Arc<dyn KvTree>,
|
||||
|
||||
// Uncategorized trees
|
||||
pub(super) eventidshort_cache: Mutex<LruCache<OwnedEventId, ShortEventId>>,
|
||||
pub(super) statekeyshort_cache:
|
||||
Mutex<LruCache<(StateEventType, String), ShortStateKey>>,
|
||||
pub(super) shortstatekey_cache:
|
||||
|
|
@ -464,14 +463,6 @@ impl KeyValueDatabase {
|
|||
global: builder.open_tree("global")?,
|
||||
server_signingkeys: builder.open_tree("server_signingkeys")?,
|
||||
|
||||
#[allow(
|
||||
clippy::as_conversions,
|
||||
clippy::cast_sign_loss,
|
||||
clippy::cast_possible_truncation
|
||||
)]
|
||||
eventidshort_cache: Mutex::new(LruCache::new(
|
||||
(100_000.0 * config.cache_capacity_modifier) as usize,
|
||||
)),
|
||||
#[allow(
|
||||
clippy::as_conversions,
|
||||
clippy::cast_sign_loss,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue