1
0

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

View File

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