1
0
Fork 0
forked from forgejo/forgejo

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:
6543 2022-05-15 20:43:27 +02:00 committed by GitHub
parent 3a245230f4
commit 00a981d341
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 15 additions and 30 deletions

View file

@ -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{})
}