Skip to content

Commit d4219f3

Browse files
committed
Fix issue in cache cleanup
1 parent ef6792a commit d4219f3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/async_utils/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
__author__ = "Michael Hall"
1010
__license__ = "Apache-2.0"
1111
__copyright__ = "Copyright 2020-Present Michael Hall"
12-
__version__ = "2025.03.08b"
12+
__version__ = "2025.03.12b"
1313

1414
import os
1515
import sys

src/async_utils/lru.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def _remove_some_expired(self) -> None:
182182
now = time.monotonic()
183183
tr = max((len(self._expirations) - self._maxsize) >> self._smooth, 2)
184184

185-
while tr > 0:
185+
while self._expirations and tr > 0:
186186
ts, k = heapq.heappop(self._expirations)
187187
if ts < now:
188188
tr -= 1

0 commit comments

Comments
 (0)