Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0ed35fd

Browse files
committedAug 23, 2023
Revert "call evict on replacing value (#135)"
This reverts commit d260bc0.
1 parent 1e956f5 commit 0ed35fd

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed
 

‎simplelru/lru.go

-3
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@ func (c *LRU[K, V]) Add(key K, value V) (evicted bool) {
5151
// Check for existing item
5252
if ent, ok := c.items[key]; ok {
5353
c.evictList.MoveToFront(ent)
54-
if c.onEvict != nil {
55-
c.onEvict(key, ent.Value)
56-
}
5754
ent.Value = value
5855
return false
5956
}

0 commit comments

Comments
 (0)
Please sign in to comment.