Update go-chi/cache to utilize Ping() (#19719)
* update gitea.com/go-chi/cache -> v0.2.0 * ajust to new interface * refactor
This commit is contained in:
5
modules/cache/cache_redis.go
vendored
5
modules/cache/cache_redis.go
vendored
@ -153,6 +153,11 @@ func (c *RedisCacher) StartAndGC(opts cache.Options) error {
|
||||
return c.c.Ping(graceful.GetManager().HammerContext()).Err()
|
||||
}
|
||||
|
||||
// Ping tests if the cache is alive.
|
||||
func (c *RedisCacher) Ping() error {
|
||||
return c.c.Ping(graceful.GetManager().HammerContext()).Err()
|
||||
}
|
||||
|
||||
func init() {
|
||||
cache.Register("redis", &RedisCacher{})
|
||||
}
|
||||
|
Reference in New Issue
Block a user