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

Method Capacity

bigcache.go:197–203  ·  view source on GitHub ↗

Capacity returns amount of bytes store in the cache.

()

Source from the content-addressed store, hash-verified

195
196// Capacity returns amount of bytes store in the cache.
197func (c *BigCache) Capacity() int {
198 var len int
199 for _, shard := range c.shards {
200 len += shard.capacity()
201 }
202 return len
203}
204
205// Stats returns cache's statistics
206func (c *BigCache) Stats() Stats {

Callers 3

capacityMethod · 0.45
TestCacheCapacityFunction · 0.45
TestCacheInitialCapacityFunction · 0.45

Calls 1

capacityMethod · 0.80

Tested by 2

TestCacheCapacityFunction · 0.36
TestCacheInitialCapacityFunction · 0.36