mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-19 11:36:57 +00:00
Move redis config to CacheConfig struct, add cache prefixes & trace logging
This commit is contained in:
parent
e1a22d5f4c
commit
46c8daacba
7 changed files with 45 additions and 30 deletions
|
@ -31,7 +31,7 @@ func (o *Options) getRedirects(giteaClient *gitea.Client, redirectsCache cache.I
|
|||
// Check for cached redirects
|
||||
if cachedValue, ok := redirectsCache.Get(cacheKey); ok {
|
||||
redirects := []Redirect{}
|
||||
err := json.Unmarshal(cachedValue, redirects)
|
||||
err := json.Unmarshal(cachedValue, &redirects)
|
||||
if err != nil {
|
||||
log.Error().Err(err).Msgf("could not parse redirects for key %s", cacheKey)
|
||||
// It's okay to continue, the array stays empty.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue