Add 'inlining of expired' note to Items()

master
Patrick Mylund Nielsen 8 years ago
parent a2d8b56f0c
commit 9e6d9117e7

@ -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

Loading…
Cancel
Save