Skip to content

Commit 09a9c58

Browse files
zhilingluoCopilot
andauthored
Update src/agentscope_runtime/engine/services/memory/redis_memory_service.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 1ea8327 commit 09a9c58

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/agentscope_runtime/engine/services/memory/redis_memory_service.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,9 @@ async def list_memory(
225225
# we need all previous messages for proper ordering)
226226
# For now, we keep loading all for correctness
227227

228+
# Refresh TTL on active use to keep memory alive, mirroring get_session behavior
229+
if getattr(self, "_ttl_seconds", None):
230+
await self._redis.expire(key, self._ttl_seconds)
228231
return all_msgs[start_index:end_index]
229232

230233
async def delete_memory(

0 commit comments

Comments
 (0)