Skip to content

Commit 18bd20e

Browse files
bsboddenCopilot
andauthored
Update langgraph/checkpoint/redis/shallow.py
Co-authored-by: Copilot <[email protected]>
1 parent 13b9df9 commit 18bd20e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

langgraph/checkpoint/redis/shallow.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,8 +463,8 @@ def _deserialize_channel_values_inline(
463463

464464
# Add to cache with size limit
465465
if len(self._channel_cache) >= self._channel_cache_max_size:
466-
# Remove oldest entry (simple FIFO)
467-
self._channel_cache.pop(next(iter(self._channel_cache)))
466+
# Remove least recently used entry (LRU)
467+
self._channel_cache.popitem(last=False)
468468
self._channel_cache[cache_key] = deserialized
469469

470470
return channel_values

0 commit comments

Comments
 (0)