mirror of
https://github.com/cloudreve/Cloudreve.git
synced 2026-11-17 22:58:07 +00:00
Fix: failed unit test / Feat: support TTL in redis cache
This commit is contained in:
1 parent
8703f97e20
commit
afc0b647ca
14 files changed
+78
-369
No files matched your search
+1
-1
@@ -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