Commit 0cd0155f9a

0cd0155f9a6914265abbfee5fed811e7635557a2

parent: 6d0cdbdfe1

Unregistered key

vaw <git@nlih.de> · 2026-09-11 23:45 UTC
committer: <noreply@github.com>

Store event cache in `~/.cache/iamb` (#596)

Layout: unified · split

src/config.rs +5
@@ -1210,6 +1210,7 @@ pub struct ApplicationSettings {
12101210 pub session_json_old: PathBuf,
12111211 pub sled_dir: PathBuf,
12121212 pub sqlite_dir: PathBuf,
1213 pub sqlite_cache_dir: PathBuf,
12131214 pub profile_name: String,
12141215 pub profile: ProfileConfig,
12151216 pub tunables: TunableValues,
@@ -1343,12 +1344,16 @@ impl ApplicationSettings {
13431344 let mut layout_json = cache_dir.clone();
13441345 layout_json.push("layout.json");
13451346
1347 let mut sqlite_cache_dir = cache_dir;
1348 sqlite_cache_dir.push("sqlite");
1349
13461350 let settings = ApplicationSettings {
13471351 sled_dir,
13481352 layout_json,
13491353 session_json,
13501354 session_json_old,
13511355 sqlite_dir,
1356 sqlite_cache_dir,
13521357 profile_name,
13531358 profile,
13541359 tunables,
src/tests.rs +1
@@ -204,6 +204,7 @@ pub fn mock_settings() -> ApplicationSettings {
204204 session_json_old: PathBuf::new(),
205205 sled_dir: PathBuf::new(),
206206 sqlite_dir: PathBuf::new(),
207 sqlite_cache_dir: PathBuf::new(),
207208
208209 profile_name: "test".into(),
209210 profile: ProfileConfig {
src/worker.rs +5 −1
@@ -824,7 +824,11 @@ async fn create_client_inner(
824824 // Set up the Matrix client for the selected profile.
825825 let builder = Client::builder()
826826 .http_client(http)
827 .sqlite_store(settings.sqlite_dir.as_path(), None)
827 .sqlite_store_with_cache_path(
828 settings.sqlite_dir.as_path(),
829 settings.sqlite_cache_dir.as_path(),
830 None,
831 )
828832 .request_config(req_config)
829833 .with_encryption_settings(DEFAULT_ENCRYPTION_SETTINGS);
830834