Add 'inlining of expired' note to Items()
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user