update
This commit is contained in:
@@ -17,8 +17,8 @@ var (
|
||||
DB: 0,
|
||||
PoolSize: 16,
|
||||
MinIdleConn: 4,
|
||||
MaxConnAge: "1h",
|
||||
IdleTimeout: "10m",
|
||||
MaxConnAge: "4h",
|
||||
IdleTimeout: "15m",
|
||||
}
|
||||
|
||||
instanceMap = make(map[string]*MyRedis)
|
||||
@@ -40,7 +40,7 @@ type (
|
||||
}
|
||||
)
|
||||
|
||||
func Instance(key ...string) *MyRedis {
|
||||
func DB(key ...string) *MyRedis {
|
||||
var key0 string
|
||||
|
||||
if len(key) > 0 {
|
||||
@@ -170,7 +170,7 @@ func (r *MyRedis) SetJson(key string, value interface{}, t ...time.Duration) (st
|
||||
}
|
||||
|
||||
func CloseInstance(key string) {
|
||||
Instance(key).Client.Close()
|
||||
DB(key).Client.Close()
|
||||
}
|
||||
|
||||
func CloseAllInstance() {
|
||||
|
||||
Reference in New Issue
Block a user