fix cache bug

This commit is contained in:
Sakurasan
2023-03-31 22:46:11 +08:00
parent a452469b51
commit 9e5815a5e0
2 changed files with 3 additions and 1 deletions

View File

@@ -8,7 +8,7 @@ on:
tags: tags:
- 'v*' - 'v*'
pull_request: pull_request:
branches: [ "main","dev" ] branches: [ "main" ]
#项目任务,任务之间可以并行调度 #项目任务,任务之间可以并行调度

View File

@@ -19,6 +19,7 @@ func init() {
} }
func LoadKeysCache() { func LoadKeysCache() {
KeysCache = cache.New(cache.NoExpiration, cache.NoExpiration)
keys, err := GetAllKeys() keys, err := GetAllKeys()
if err != nil { if err != nil {
log.Println(err) log.Println(err)
@@ -40,6 +41,7 @@ func FromKeyCacheRandomItem() string {
} }
func LoadAuthCache() { func LoadAuthCache() {
AuthCache = cache.New(cache.NoExpiration, cache.NoExpiration)
users, err := GetAllUsers() users, err := GetAllUsers()
if err != nil { if err != nil {
log.Println(err) log.Println(err)