mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 07:41:23 +01:00
add constructor for spaces service
Also adds a public function to invalidate the cache rather than exposing the entire cache publicly.
This commit is contained in:
parent
f702b6cccd
commit
f771d319b2
4 changed files with 19 additions and 16 deletions
|
|
@ -3,9 +3,6 @@ use std::{
|
|||
sync::{Arc, Mutex as StdMutex, OnceLock},
|
||||
};
|
||||
|
||||
use lru_cache::LruCache;
|
||||
use tokio::sync::Mutex;
|
||||
|
||||
use crate::{observability::FilterReloadHandles, Config, Result};
|
||||
|
||||
pub(crate) mod account_data;
|
||||
|
|
@ -171,9 +168,7 @@ impl Services {
|
|||
threads: rooms::threads::Service {
|
||||
db,
|
||||
},
|
||||
spaces: rooms::spaces::Service {
|
||||
roomid_spacechunk_cache: Mutex::new(LruCache::new(200)),
|
||||
},
|
||||
spaces: rooms::spaces::Service::new(200),
|
||||
user: db,
|
||||
},
|
||||
transaction_ids: db,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue