#4992·litestar

Enhancement: Support redis hashes with field expiration for namespaced `RedisStore`s on redis 7.4+

Author: provinzkrautCreated Aug 16, 2026Updated Sep 7, 2026
LabelsEnhancementGood Intermediate Issue

Summary

Redis 7.4 introduced field expiration for hashes. This allows us to more easily implement namespaced stores for redis, also giving a big performance improvement for bulk deletions (because the hash key can simply be deleted instead of iterating over every individual key in the namespace).

This feature should be opt-in, possibly with a None default, detecting the redis version on startup and using the optimal strategy.

On redis 8+, HGETEX can be used for "get and renew" actions