refactor(cache): 移除内存缓存和Redis缓存的初始化逻辑 移除了mem包中内存缓存的初始化函数,以及with包中Redis缓存的初始化函数。 这些缓存初始化逻辑将被重构到其他位置或采用新的实现方式。 ```
17 lines
354 B
Go
17 lines
354 B
Go
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)
|
|
}
|
|
}
|