package utility import ( "github.com/gogf/gf/v2/frame/g" "github.com/gogf/gf/v2/os/gcache" ) var RedisCache = func() *gcache.Cache { cache := gcache.New() cache.SetAdapter(gcache.NewAdapterRedis(g.Redis())) return cache }()