Skip to content

Commit e09556b

Browse files
authored
Merge pull request #36 from Code-Hex/fix/33
removed log
2 parents 6ad9dfb + 87ed625 commit e09556b

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

policy/lfu/lfu.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package lfu
22

33
import (
44
"container/heap"
5-
"log"
65
)
76

87
// Cache is used a LFU (Least-frequently used) cache replacement policy.
@@ -70,8 +69,6 @@ func (c *Cache[K, V]) Set(key K, val V) {
7069

7170
if len(c.items) == c.cap {
7271
evictedEntry := heap.Pop(c.queue).(*entry[K, V])
73-
// e := evictedEntry
74-
// log.Println(c.items, e.index, e.key)
7572
delete(c.items, evictedEntry.key)
7673
}
7774

@@ -92,7 +89,6 @@ func (c *Cache[K, V]) Keys() []K {
9289
// Delete deletes the item with provided key from the cache.
9390
func (c *Cache[K, V]) Delete(key K) {
9491
if e, ok := c.items[key]; ok {
95-
log.Println(c.items, e.index, e.key)
9692
heap.Remove(c.queue, e.index)
9793
delete(c.items, key)
9894
}

0 commit comments

Comments
 (0)