Cache local instance user on start

This commit is contained in:
Kitaiti Makoto
2021-12-05 19:32:27 +09:00
parent 1506802c20
commit 2f7a5cbf56
2 changed files with 4 additions and 1 deletions
+3 -1
View File
@@ -57,7 +57,9 @@ fn init_pool() -> Option<DbPool> {
builder = builder.max_size(max_size);
};
let pool = builder.build(manager).ok()?;
Instance::cache_local(&pool.get().unwrap());
let conn = pool.get().unwrap();
Instance::cache_local(&conn);
Instance::cache_local_instance_user(&conn);
Some(pool)
}