mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 15:51:23 +01:00
move shorteventid_cache to service
This commit is contained in:
parent
7563360bee
commit
47502d1f36
4 changed files with 45 additions and 30 deletions
|
|
@ -236,7 +236,6 @@ pub(crate) struct KeyValueDatabase {
|
|||
pub(super) senderkey_pusher: Arc<dyn KvTree>,
|
||||
|
||||
// Uncategorized trees
|
||||
pub(super) shorteventid_cache: Mutex<LruCache<ShortEventId, Arc<EventId>>>,
|
||||
pub(super) auth_chain_cache:
|
||||
Mutex<LruCache<Vec<ShortEventId>, Arc<HashSet<ShortEventId>>>>,
|
||||
pub(super) eventidshort_cache: Mutex<LruCache<OwnedEventId, ShortEventId>>,
|
||||
|
|
@ -480,14 +479,6 @@ impl KeyValueDatabase {
|
|||
clippy::cast_sign_loss,
|
||||
clippy::cast_possible_truncation
|
||||
)]
|
||||
shorteventid_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
|
||||
)]
|
||||
eventidshort_cache: Mutex::new(LruCache::new(
|
||||
(100_000.0 * config.cache_capacity_modifier) as usize,
|
||||
)),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue