瀏覽代碼

update

add_mode
DengBiao 1 年之前
父節點
當前提交
f2eb7e7891
共有 2 個檔案被更改,包括 2 行新增3 行删除
  1. +1
    -1
      app/cfg/init_cache.go
  2. +1
    -2
      app/utils/cache/redis.go

+ 1
- 1
app/cfg/init_cache.go 查看文件

@@ -5,5 +5,5 @@ import (
)

func InitCache() {
cache.NewRedis(RedisAddr, RedisPassword)
cache.NewRedis(RedisAddr)
}

+ 1
- 2
app/utils/cache/redis.go 查看文件

@@ -36,7 +36,7 @@ type Config struct {
var pool *redigo.Pool
var conf *Config

func NewRedis(addr, password string) {
func NewRedis(addr string) {
if addr == "" {
panic("\nredis connect string cannot be empty\n")
}
@@ -48,7 +48,6 @@ func NewRedis(addr, password string) {
Wait: true,
Dial: func() (redigo.Conn, error) {
c, err := redigo.Dial("tcp", addr,
redigo.DialPassword(password),
redigo.DialConnectTimeout(redisDialTTL),
redigo.DialReadTimeout(redisReadTTL),
redigo.DialWriteTimeout(redisWriteTTL),


Loading…
取消
儲存