diff --git a/app/cfg/init_cache.go b/app/cfg/init_cache.go index 12c338c..873657f 100644 --- a/app/cfg/init_cache.go +++ b/app/cfg/init_cache.go @@ -5,5 +5,5 @@ import ( ) func InitCache() { - cache.NewRedis(RedisAddr, RedisPassword) + cache.NewRedis(RedisAddr) } diff --git a/app/utils/cache/redis.go b/app/utils/cache/redis.go index d3f0ba7..3c4b914 100644 --- a/app/utils/cache/redis.go +++ b/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),