✨ Redis cache
This commit is contained in:
14
pkg/internal/cache/redis.go
vendored
Normal file
14
pkg/internal/cache/redis.go
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
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
|
||||
}
|
Reference in New Issue
Block a user