|
- package svc
-
- import (
- "applet/app/cfg"
- "applet/app/db"
- "applet/app/utils/cache"
- "testing"
- )
-
- func TestAutoCachingTop100(t *testing.T) {
- dbcfg := cfg.DBCfg{
- Host: "119.23.182.117:3306",
- Name: "egg",
- User: "root",
- Psw: "Fnuo123com@",
- ShowLog: true,
- MaxLifetime: 30,
- MaxOpenConns: 100,
- MaxIdleConns: 100,
- Path: "tmp/%s.log",
- }
- db.InitDB(&dbcfg)
- cache.NewRedis("127.0.0.1:6379")
-
- AutoCachingTop100(db.Db)
- }
|