Skip to content

Commit

Permalink
GetItems: use getItem
Browse files Browse the repository at this point in the history
  • Loading branch information
DoubleDi authored and ReneKroon committed Dec 15, 2021
1 parent 14f5461 commit f3ee70c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,11 @@ func (cache *Cache) GetItems() map[string]interface{} {
return nil
}
items := make(map[string]interface{}, len(cache.items))
for k, item := range cache.items {
items[k] = item.data
for k := range cache.items {
item, exists, _ := cache.getItem(k)
if exists {
items[k] = item.data
}
}
return items
}
Expand Down

0 comments on commit f3ee70c

Please sign in to comment.