数据库缓存更新
This commit is contained in:
+8
-3
@@ -8,13 +8,12 @@ import (
|
||||
//"go.hoteas.com/hotime/cache"
|
||||
"golang.org/x/net/websocket"
|
||||
"time"
|
||||
"go.hoteas.com/hotime/cache"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
|
||||
|
||||
|
||||
appIns := hotime.Application{}
|
||||
|
||||
|
||||
@@ -32,8 +31,14 @@ func main() {
|
||||
//手动模式,
|
||||
appIns.SetConfig("example/config/config.json")
|
||||
|
||||
|
||||
//redis缓存接入
|
||||
//ca:=hotime.CacheIns(&cache.CacheRedis{Host:appIns.Config.GetString("redisHost"),Pwd:appIns.Config.GetString("redisPwd"),Time:appIns.Config.GetCeilInt64("cacheLongTime")})
|
||||
//ca.Cache("xyzm","dasdas")
|
||||
//ca.Cache("xyzn","dasdas")
|
||||
//ca.Cache("xyzo","dasdas")
|
||||
//ca.Cache("xyz*",nil)
|
||||
//fmt.Println(ca.Cache("xyzm").Data)
|
||||
|
||||
|
||||
appIns.SetConnectDB(func(err ...*hotime.Error) *sql.DB {
|
||||
query := appIns.Config.GetString("dbUser") + ":" + appIns.Config.GetString("dbPwd") +
|
||||
|
||||
Reference in New Issue
Block a user