litestar-org/litestar

Enhancement: Use redis `GETEX` in `RedisStore.get` for `renew_for` functionality on redis 6.2+

Open

#4,993 opened on Aug 16, 2026

 (3 comments) (0 reactions) (0 assignees)Python (550 forks)user submission
EnhancementGood First Issue

Repository metrics

Stars
 (8,243 stars)
PR merge metrics
 (Avg merge 13h 27m) (26 merged PRs in 30d)

Description

Summary

RedisStore.get predates Redi 6.2, which introduced GETEX to get a value and set its expiry in one step. On supported redis versions, GETEX should be used instead of the custom script.

Contributor guide