Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix stuck in LruCache after updating items
Inside the LruCache, it always create a new link node when doing the []= operator, what if we're doing the "updating" operation? The `_entries` will replace the new value to the same key entry, but the link list will have two nodes with a same key, once the capacity is exhausted, the application will stuck in removing item as the second removing with the same key changes nothing.
- Loading branch information
grootzhang
committed
Sep 8, 2022
1 parent
9d607d5
commit dff50b1
Showing
2 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters