mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
Introduce config caching (#3131)
* Introduce config caching * Changelog * Update CHANGELOG.md Co-authored-by: bjoern <r10s@b44t.com> * Cache a value after reading it Co-authored-by: bjoern <r10s@b44t.com>
This commit is contained in:
@@ -622,6 +622,10 @@ impl Sql {
|
||||
.await
|
||||
.with_context(|| format!("execute_migration failed for version {}", version))?;
|
||||
|
||||
let mut lock = self.config_cache.write().await;
|
||||
lock.insert(VERSION_CFG.to_string(), Some(format!("{}", version)));
|
||||
drop(lock);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user