init.go 498 字节
package redis

import (
	ilog "github.com/linmadan/egglib-go/log"
	"github.com/linmadan/egglib-go/persistent/cache"
	"github.com/linmadan/egglib-go/persistent/cache/gzcache"
	"gitlab.fjmaimaimai.com/mmm-go-pp/terms/pkg/constant"
	"gitlab.fjmaimaimai.com/mmm-go-pp/terms/pkg/log"
)

func init() {
	cache.NewDefaultCache(cache.WithDebugLog(true, func() ilog.Logger { return log.Logger }))
	cache.RegisterCache(gzcache.NewNodeCache(constant.REDIS_HOST+":"+constant.REDIS_PORT, constant.REDIS_AUTH))
}