MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / CleanAll

Method CleanAll

internal/caches/storage_memory.go:272–279  ·  view source on GitHub ↗

CleanAll 清除所有缓存

()

Source from the content-addressed store, hash-verified

270
271// CleanAll 清除所有缓存
272func (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 批量删除缓存
282func (this *MemoryStorage) Purge(keys []string, urlType string) error {

Callers 1

UpdatePolicyMethod · 0.95

Calls 3

ResetMethod · 0.65
LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected