Commit 8415ab9
committed
fix: handle KeyError in LRUTrieCache move_to_end method
- Added error handling for KeyError when moving items to the end of the LRU cache.
- If the key is not found, it initializes the key with None and then moves it to the end, followed by eviction of the least recently used item.1 parent 7e75f9f commit 8415ab9
1 file changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
45 | 50 | | |
46 | 51 | | |
47 | 52 | | |
| |||
0 commit comments