Fix: failed unit test / Feat: support TTL in redis cache

This commit is contained in:
HFO4 committed 2019-12-13 13:22:10 +08:00
1 parent 8703f97e20
commit afc0b647ca
14 files changed
+78 -369

No files matched your search

+1 -1
View File
@@ -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