This repository has been archived on 2025-04-12. You can view files and clone it, but cannot push or open issues or pull requests.
Nexus/pkg/internal/cache/redis.go
2025-03-29 02:24:15 +08:00

15 lines
247 B
Go

package cache
import "github.com/redis/go-redis/v9"
var Rdb *redis.Client
func ConnectRedis(addr, password string, db int) error {
Rdb = redis.NewClient(&redis.Options{
Addr: addr,
Password: password,
DB: db,
})
return nil
}