ItemCount() is equivalent to len(c.Items()), not len(c.Items)
This commit is contained in:
parent
fd89281dfd
commit
e91e36d111
2
cache.go
2
cache.go
|
@ -944,7 +944,7 @@ func (c *cache) Items() map[string]*Item {
|
|||
}
|
||||
|
||||
// Returns the number of items in the cache. This may include items that have
|
||||
// expired, but have not yet been cleaned up. Equivalent to len(c.Items).
|
||||
// expired, but have not yet been cleaned up. Equivalent to len(c.Items()).
|
||||
func (c *cache) ItemCount() int {
|
||||
c.RLock()
|
||||
n := len(c.items)
|
||||
|
|
Loading…
Reference in New Issue