Skip to content

Conversation

@bsbodden
Copy link
Contributor

Implements Time-To-Live (TTL) functionality for Redis-based checkpoint storage in LangGraph. This allows
automatic expiration of checkpoint data after a configurable time period, helping to manage Redis memory usage.

Key features:

  • Add TTL configuration option to RedisSaver and AsyncRedisSaver constructors
  • Implement TTL refresh-on-read functionality to extend expiration when checkpoints are accessed
  • Apply TTL consistently to all related keys (checkpoints, blobs, writes)
  • Add comprehensive test suite for TTL functionality
  • Update type hints to use explicit format (Dict, List, Tuple) for better clarity

  Implements Time-To-Live (TTL) functionality for Redis-based checkpoint storage in LangGraph. This allows
  automatic expiration of checkpoint data after a configurable time period, helping to manage Redis memory usage.

  Key features:
  - Add TTL configuration option to RedisSaver and AsyncRedisSaver constructors
  - Implement TTL refresh-on-read functionality to extend expiration when checkpoints are accessed
  - Apply TTL consistently to all related keys (checkpoints, blobs, writes)
  - Add comprehensive test suite for TTL functionality
  - Update type hints to use explicit format (Dict, List, Tuple) for better clarity
@bsbodden bsbodden requested a review from abrookins April 30, 2025 20:06
@bsbodden bsbodden self-assigned this Apr 30, 2025
Copy link
Contributor

@abrookins abrookins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks right to me. Too bad we can't do JSON.SET ... EX. We should talk to someone about that.

@bsbodden bsbodden merged commit 6fed6ad into main May 1, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants