CleanAll 清除所有缓存
()
| 270 | |
| 271 | // CleanAll 清除所有缓存 |
| 272 | func (this *MemoryStorage) CleanAll() error { |
| 273 | this.locker.Lock() |
| 274 | this.valuesMap = map[uint64]*MemoryItem{} |
| 275 | _ = this.list.Reset() |
| 276 | atomic.StoreInt64(&this.usedSize, 0) |
| 277 | this.locker.Unlock() |
| 278 | return nil |
| 279 | } |
| 280 | |
| 281 | // Purge 批量删除缓存 |
| 282 | func (this *MemoryStorage) Purge(keys []string, urlType string) error { |
no test coverage detected