mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2026-09-19 15:14:14 +00:00
Make it possible to actually use redis for caching through the config flags
This commit is contained in:
Vendored
+2
-6
@@ -36,13 +36,9 @@ func (r *RedisCache) Remove(key string) {
|
||||
}
|
||||
}
|
||||
|
||||
func NewRedisCache() ICache {
|
||||
func NewRedisCache(opts *redis.Options) ICache {
|
||||
return &RedisCache{
|
||||
context.Background(),
|
||||
redis.NewClient(&redis.Options{
|
||||
Addr: "localhost:6379",
|
||||
Password: "", // no password set
|
||||
DB: 0, // use default DB
|
||||
}),
|
||||
redis.NewClient(opts),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user