接入RESTfull风格接口

This commit is contained in:
hoteas
2021-05-30 00:01:15 +08:00
parent c46fdd8985
commit 465ea889a2
4 changed files with 15 additions and 5 deletions
+4 -1
View File
@@ -180,7 +180,10 @@ func (that *Application) SetCache() {
cacheIns := HoTimeCache{}
cacheIns.Init(that.Config.GetMap("cache"), HoTimeDBInterface(&that.Db), &that.Error)
that.HoTimeCache = &cacheIns
that.Db.HoTimeCache = &cacheIns
//debug模式开启的时候关闭数据库缓存,防止调试出问题
if that.Config.GetInt("debug") == 0 {
that.Db.HoTimeCache = &cacheIns
}
}
// SetConfig 设置配置文件路径全路径或者相对路径