I build CacheDeck , an iPhone app for checking production Redis during an incident. You won't need it here: everything below runs in Docker with redis-cli .
A cache key had a 600-second TTL until one write:
> SET k v1 EX 600 OK > TTL k ( integer ) 600 > SET k v2 OK > TTL k ( integer ) -1
Enter fullscreen mode
Exit fullscreen mode
-1 means the key has no expiry. Per the SET docs , "any previous time to live associated with the key is discarded on successful SET operation." If your refresh path calls a plain SET , each refreshed key stays in memory until you delete it or an allkeys-* policy evicts it.
My setup: the redis:8 image (Redis 8.10.3) in Docker on a Mac mini M4, 24 November 2026.
Writes that drop the TTL, and writes that keep it
I gave each key a 600-second TTL.…