```
refactor(cache): 移除内存缓存和Redis缓存的初始化逻辑 移除了mem包中内存缓存的初始化函数,以及with包中Redis缓存的初始化函数。 这些缓存初始化逻辑将被重构到其他位置或采用新的实现方式。 ```
This commit is contained in:
16
with/redis.go
Normal file
16
with/redis.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package with
|
||||
|
||||
import (
|
||||
"git.apinb.com/bsm-sdk/core/cache/redis"
|
||||
"git.apinb.com/bsm-sdk/core/print"
|
||||
"git.apinb.com/bsm-sdk/core/vars"
|
||||
)
|
||||
|
||||
func RedisCache(cfg string, cli *redis.RedisClient) {
|
||||
if cfg != "" {
|
||||
cli = redis.New(cfg, vars.ServiceKey)
|
||||
|
||||
// print inform.
|
||||
print.Info("[BSM - %s] Cache: %s, DBIndex: %d", vars.ServiceKey, cfg, cli.DB)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user