Menu

Redis SET Wiped the TTL, and volatile-lru Ran Out of Keys to Evict
📰

Redis SET Wiped the TTL, and volatile-lru Ran Out of Keys to Evict

DEV Community: redis·Vladimir Chemeris·12 days ago
#zPvy5VRp
#devtoredis#devto#dev#keys#redis
Long article (1051 words) — no AI summary yet.
Reading 0:00
15s threshold

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.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.