fix cache bug
This commit is contained in:
2
.github/workflows/ci.yaml
vendored
2
.github/workflows/ci.yaml
vendored
@@ -8,7 +8,7 @@ on:
|
||||
tags:
|
||||
- 'v*'
|
||||
pull_request:
|
||||
branches: [ "main","dev" ]
|
||||
branches: [ "main" ]
|
||||
|
||||
|
||||
#项目任务,任务之间可以并行调度
|
||||
|
||||
@@ -19,6 +19,7 @@ func init() {
|
||||
}
|
||||
|
||||
func LoadKeysCache() {
|
||||
KeysCache = cache.New(cache.NoExpiration, cache.NoExpiration)
|
||||
keys, err := GetAllKeys()
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
@@ -40,6 +41,7 @@ func FromKeyCacheRandomItem() string {
|
||||
}
|
||||
|
||||
func LoadAuthCache() {
|
||||
AuthCache = cache.New(cache.NoExpiration, cache.NoExpiration)
|
||||
users, err := GetAllUsers()
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
|
||||
Reference in New Issue
Block a user