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

Method Delete

internal/caches/storage_memory.go:252–259  ·  view source on GitHub ↗

Delete 删除某个键值对应的缓存

(key string)

Source from the content-addressed store, hash-verified

250
251// Delete 删除某个键值对应的缓存
252func (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 统计缓存
262func (this *MemoryStorage) Stat() (*Stat, error) {

Callers 3

OpenReaderMethod · 0.95
PurgeMethod · 0.95
flushItemMethod · 0.95

Calls 5

hashMethod · 0.95
RemoveMethod · 0.65
LockMethod · 0.45
StringMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected