Delete 删除某个键值对应的缓存
(key string)
| 250 | |
| 251 | // Delete 删除某个键值对应的缓存 |
| 252 | func (this *MemoryStorage) Delete(key string) error { |
| 253 | var hash = this.hash(key) |
| 254 | this.locker.Lock() |
| 255 | delete(this.valuesMap, hash) |
| 256 | _ = this.list.Remove(types.String(hash)) |
| 257 | this.locker.Unlock() |
| 258 | return nil |
| 259 | } |
| 260 | |
| 261 | // Stat 统计缓存 |
| 262 | func (this *MemoryStorage) Stat() (*Stat, error) { |