refactor: token cache logic

This commit is contained in:
CalciumIon
2024-12-30 17:10:48 +08:00
parent ca8b7ed1c3
commit bb5e032dd2
15 changed files with 417 additions and 196 deletions

View File

@@ -88,3 +88,7 @@ func RecordExist(err error) (bool, error) {
}
return false, err
}
func shouldUpdateRedis(fromDB bool, err error) bool {
return common.RedisEnabled && fromDB && err == nil
}