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

Method Len

bigcache.go:188–194  ·  view source on GitHub ↗

Len computes number of entries in cache

()

Source from the content-addressed store, hash-verified

186
187// Len computes number of entries in cache
188func (c *BigCache) Len() int {
189 var len int
190 for _, shard := range c.shards {
191 len += shard.len()
192 }
193 return len
194}
195
196// Capacity returns amount of bytes store in the cache.
197func (c *BigCache) Capacity() int {

Callers 5

TestAppendRandomlyFunction · 0.45
TestCacheLenFunction · 0.45
TestCacheCapacityFunction · 0.45
TestCacheInitialCapacityFunction · 0.45
TestCacheResetFunction · 0.45

Calls 1

lenMethod · 0.80

Tested by 5

TestAppendRandomlyFunction · 0.36
TestCacheLenFunction · 0.36
TestCacheCapacityFunction · 0.36
TestCacheInitialCapacityFunction · 0.36
TestCacheResetFunction · 0.36