From 9e5815a5e0f2d4fc51846762e4db332588791c4c Mon Sep 17 00:00:00 2001 From: Sakurasan <1173092237@qq.com> Date: Fri, 31 Mar 2023 22:46:11 +0800 Subject: [PATCH] fix cache bug --- .github/workflows/ci.yaml | 2 +- store/cache.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 920a3d7..3a4c1b2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -8,7 +8,7 @@ on: tags: - 'v*' pull_request: - branches: [ "main","dev" ] + branches: [ "main" ] #项目任务,任务之间可以并行调度 diff --git a/store/cache.go b/store/cache.go index 86e84fa..cd7abef 100644 --- a/store/cache.go +++ b/store/cache.go @@ -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)