Skip to content

Commit

Permalink
fix: キャッシュの上限を超えノードが削除されたときにエラーが発生する #147
Browse files Browse the repository at this point in the history
  • Loading branch information
yupix committed Oct 8, 2024
1 parent 5ecc256 commit 8a2f586
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mipac/utils/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def get(self, key: str) -> Any:

def put(self, key: str, value: Any):
if key in self.items: # 既に同一のキーが存在する場合は再登録するために一度消す
del self.items[key]
self._remove_node(self.items[key])

node = Node(key, value)
self._add(node)
Expand Down

0 comments on commit 8a2f586

Please sign in to comment.