🔧 refactor(redis): replace direct constant usage with RedisKeyCacheSeconds function for cache duration

This commit is contained in:
RedwindA committed 2025-06-17 03:24:39 +08:00
1 parent e34d3c2160
commit 09ffc364f2
3 files changed
+6 -8

No files matched your search

+4 -6
View File
@@ -2,12 +2,10 @@ package constant
import "one-api/common"
var (
TokenCacheSeconds = common.SyncFrequency
UserId2GroupCacheSeconds = common.SyncFrequency
UserId2QuotaCacheSeconds = common.SyncFrequency
UserId2StatusCacheSeconds = common.SyncFrequency
)
// 使用函数来避免初始化顺序带来的赋值问题
func RedisKeyCacheSeconds() int {
return common.SyncFrequency
}
// Cache keys
const (