unc newPool(server, password string) *redis.Pool {
return &redis.Pool{
MaxIdle: 3,...IdleTimeout: 240 * time.Second,
Dial: func () (redis.Conn, error) {
c, err := redis.Dial...return nil, err
}
return c, err
},
TestOnBorrow: func(c redis.Conn...error {
_, err := c.Do("PING")
return err
},
}
}
var (
pool *redis.Pool