mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-04-18 12:07:27 +00:00
refactor: token cache logic
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user