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

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

2
pkg/cache/memo.go vendored
View File

@@ -15,7 +15,7 @@ func NewMemoStore() *MemoStore {
}
// Set 存储值
func (store *MemoStore) Set(key string, value interface{}) error {
func (store *MemoStore) Set(key string, value interface{}, ttl int) error {
store.Store.Store(key, value)
return nil
}