Add 'inlining of expired' note to Items()

This commit is contained in:
Patrick Mylund Nielsen 2016-11-25 13:57:39 -05:00
parent a2d8b56f0c
commit 9e6d9117e7
1 changed files with 1 additions and 0 deletions

View File

@ -1005,6 +1005,7 @@ func (c *cache) Items() map[string]Item {
m := make(map[string]Item, len(c.items))
now := time.Now().UnixNano()
for k, v := range c.items {
// "Inlining" of Expired
if v.Expiration > 0 {
if now > v.Expiration {
continue