mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-27 18:11:57 +08:00
Fix: failed unit test / Feat: support TTL in redis cache
This commit is contained in:
@@ -61,7 +61,7 @@ func GetPolicyByID(ID interface{}) (Policy, error) {
|
||||
|
||||
// 写入缓存
|
||||
if result.Error == nil {
|
||||
_ = cache.Set(cacheKey, policy)
|
||||
_ = cache.Set(cacheKey, policy, -1)
|
||||
}
|
||||
|
||||
return policy, result.Error
|
||||
|
||||
Reference in New Issue
Block a user