Add 'inlining of expired' note to Items()
This commit is contained in:
parent
a2d8b56f0c
commit
9e6d9117e7
1
cache.go
1
cache.go
@ -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…
Reference in New Issue
Block a user