increase icon cache ttl to 3 days, remove pruned message when no icon pruned

This commit is contained in:
yusing 2025-02-13 03:06:18 +08:00
parent 82042e0b99
commit bdc086c285

View file

@ -24,7 +24,7 @@ var (
) )
const ( const (
iconCacheTTL = 24 * time.Hour iconCacheTTL = 3 * 24 * time.Hour
cleanUpInterval = time.Hour cleanUpInterval = time.Hour
) )
@ -77,8 +77,10 @@ func pruneExpiredIconCache() {
nPruned++ nPruned++
} }
} }
if nPruned > 0 {
logging.Info().Int("pruned", nPruned).Msg("pruned expired icon cache") logging.Info().Int("pruned", nPruned).Msg("pruned expired icon cache")
} }
}
func routeKey(r route.HTTPRoute) string { func routeKey(r route.HTTPRoute) string {
return r.ProviderName() + ":" + r.TargetName() return r.ProviderName() + ":" + r.TargetName()