improvement: pdu cache, /sync cache
This commit is contained in:
parent
dcac1361ec
commit
05821d6fd5
16 changed files with 424 additions and 243 deletions
|
@ -17,6 +17,7 @@ use crate::{utils, Error, Result};
|
|||
use abstraction::DatabaseEngine;
|
||||
use directories::ProjectDirs;
|
||||
use log::error;
|
||||
use lru_cache::LruCache;
|
||||
use rocket::futures::{channel::mpsc, stream::FuturesUnordered, StreamExt};
|
||||
use ruma::{DeviceId, ServerName, UserId};
|
||||
use serde::Deserialize;
|
||||
|
@ -189,6 +190,7 @@ impl Database {
|
|||
|
||||
eventid_outlierpdu: builder.open_tree("eventid_outlierpdu")?,
|
||||
prevevent_parent: builder.open_tree("prevevent_parent")?,
|
||||
pdu_cache: RwLock::new(LruCache::new(1_000_000)),
|
||||
},
|
||||
account_data: account_data::AccountData {
|
||||
roomuserdataid_accountdata: builder.open_tree("roomuserdataid_accountdata")?,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue