Capacity returns amount of bytes store in the cache.
()
| 195 | |
| 196 | // Capacity returns amount of bytes store in the cache. |
| 197 | func (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 |
| 206 | func (c *BigCache) Stats() Stats { |