KeyMetadata returns number of times a cached resource was requested.
(key string)
| 218 | |
| 219 | // KeyMetadata returns number of times a cached resource was requested. |
| 220 | func (c *BigCache) KeyMetadata(key string) Metadata { |
| 221 | hashedKey := c.hash.Sum64(key) |
| 222 | shard := c.getShard(hashedKey) |
| 223 | return shard.getKeyMetadataWithLock(hashedKey) |
| 224 | } |
| 225 | |
| 226 | // Iterator returns iterator function to iterate over EntryInfo's from whole cache. |
| 227 | func (c *BigCache) Iterator() *EntryInfoIterator { |