This commit is contained in:
wangchuxiao
2023-03-27 17:20:36 +08:00
parent cfb157d2e4
commit cb26321847
13 changed files with 23 additions and 18 deletions
+7 -2
View File
@@ -21,7 +21,8 @@ type metaCache interface {
// delete key rapid
DelKey(ctx context.Context, key string) error
AddKeys(keys ...string)
GetPreDeleteKeys() []string
ClearKeys()
GetPreDelKeys() []string
}
func NewMetaCacheRedis(rcClient *rockscache.Client, keys ...string) metaCache {
@@ -49,7 +50,11 @@ func (m *metaCacheRedis) AddKeys(keys ...string) {
m.keys = append(m.keys, keys...)
}
func (m *metaCacheRedis) GetPreDeleteKeys() []string {
func (m *metaCacheRedis) ClearKeys() {
m.keys = []string{}
}
func (m *metaCacheRedis) GetPreDelKeys() []string {
return m.keys
}