MCPcopy Create free account
hub / github.com/allegro/bigcache / Delete

Method Delete

bigcache.go:165–169  ·  view source on GitHub ↗

Delete removes the key

(key string)

Source from the content-addressed store, hash-verified

163
164// Delete removes the key
165func (c *BigCache) Delete(key string) error {
166 hashedKey := c.hash.Sum64(key)
167 shard := c.getShard(hashedKey)
168 return shard.del(hashedKey)
169}
170
171// Reset empties all cache shards
172func (c *BigCache) Reset() error {

Callers 8

TestOnRemoveFilterFunction · 0.80
TestCacheStatsFunction · 0.80
TestCacheRestStatsFunction · 0.80
TestCacheDelFunction · 0.80
TestCacheDelRandomlyFunction · 0.80
deleteCacheHandlerFunction · 0.80

Calls 3

getShardMethod · 0.95
delMethod · 0.80
Sum64Method · 0.65

Tested by 7

TestOnRemoveFilterFunction · 0.64
TestCacheStatsFunction · 0.64
TestCacheRestStatsFunction · 0.64
TestCacheDelFunction · 0.64
TestCacheDelRandomlyFunction · 0.64