diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2024-04-13 16:38:44 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-13 08:38:44 +0000 |
commit | c248f010ad08a7017ba1d418e9b6a5b72aff0c88 (patch) | |
tree | 4e479229bc1248e123f2ed9296edf80fe96cdd65 /services/repository/commitstatus/commitstatus.go | |
parent | 8fd8978b4934865c2b041216e84e923ad574a4c7 (diff) | |
download | gitea-c248f010ad08a7017ba1d418e9b6a5b72aff0c88.tar.gz gitea-c248f010ad08a7017ba1d418e9b6a5b72aff0c88.zip |
Refactor cache and disable go-chi cache (#30417)
use built-in cache package to wrap external go-chi cache package
Diffstat (limited to 'services/repository/commitstatus/commitstatus.go')
-rw-r--r-- | services/repository/commitstatus/commitstatus.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/repository/commitstatus/commitstatus.go b/services/repository/commitstatus/commitstatus.go index 7c1c6c2609..8a62a603d4 100644 --- a/services/repository/commitstatus/commitstatus.go +++ b/services/repository/commitstatus/commitstatus.go @@ -34,7 +34,7 @@ type commitStatusCacheValue struct { func getCommitStatusCache(repoID int64, branchName string) *commitStatusCacheValue { c := cache.GetCache() - statusStr, ok := c.Get(getCacheKey(repoID, branchName)).(string) + statusStr, ok := c.Get(getCacheKey(repoID, branchName)) if ok && statusStr != "" { var cv commitStatusCacheValue err := json.Unmarshal([]byte(statusStr), &cv) |