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:
Hocuri
2022-03-21 11:13:43 +01:00
committed by GitHub
parent 7d26968bb3
commit 321e3e27de
4 changed files with 33 additions and 1 deletions

View File

@@ -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(())
}
}