This commit is contained in:
kenneth
2023-12-25 11:15:27 +08:00
parent d41908ded5
commit 887c5bc859
4 changed files with 23 additions and 7 deletions

View File

@@ -20,11 +20,11 @@ var (
const CacheDuration = 6 * time.Hour
func InitializeStore() {
func InitializeStore(addr string, password string, db int) {
redisClient := redis.NewClient(&redis.Options{
Addr: "localhost:6378",
Password: "secret",
DB: 0,
Addr: addr,
Password: password,
DB: db,
})
pong, err := redisClient.Ping(ctx).Result()