mirror of
https://github.com/duke-git/lancet.git
synced 2026-11-16 05:12:11 +08:00
fix(package): update LRU length after deletion (#359)
Signed-off-by: Yusuf Efe <120668197+yuefdev@users.noreply.github.com>
This commit is contained in:
1 parent
9b0a0caa75
commit
9555cb2fc5
2 files changed
+25
No files matched your search
@@ -77,6 +77,7 @@ func (l *LRUCache[K, V]) Delete(key K) bool {
|
||||
if ok {
|
||||
key := l.deleteNode(node)
|
||||
delete(l.cache, key)
|
||||
l.length = len(l.cache)
|
||||
return true
|
||||
}
|
||||
l.length = len(l.cache)
|
||||
|
||||
Reference in new issue
Block a user