数据库缓存增加设置

This commit is contained in:
hoteas
2019-05-27 17:01:13 +00:00
parent 374e0ab2ac
commit 060b74f94c
3 changed files with 20 additions and 6 deletions
+12
View File
@@ -133,8 +133,20 @@ func (this *Application) Run(router Router) {
//启动实例
func (this *Application) SetConnectDB(connect func(err ...*Error) *sql.DB) {
//this.Db.DBCached=false
//if this.Config.GetCeilInt("dbCached")!=0{
// this.Db.DBCached=true
//}
this.connectDbFunc = connect
this.Db.SetConnect(this.connectDbFunc)
this.Db.DBCached=false
if this.Config.GetCeilInt("dbCached")!=0{
this.Db.DBCached=true
}
}
//设置配置文件路径全路径或者相对路径