Skip to content

Commit cda08bb

Browse files
committed
feat: add in-memory state expiration to StateManagerMemory
Implement automatic eviction of idle client states in the memory state manager using a heap-based expiration system. States are touched on get/set and purged after token_expiration seconds of inactivity. Locked states defer eviction until their lock is released. Also fix StateManager.create to respect an explicit memory mode when a Redis URL is configured.
1 parent 2b0e097 commit cda08bb

3 files changed

Lines changed: 137 additions & 301 deletions

File tree

reflex/istate/manager/_expiration.py

Lines changed: 0 additions & 239 deletions
This file was deleted.

0 commit comments

Comments
 (0)