Anton Dolganin

I'm an engineer focused on solving problems, not tied to any specific language. Architecture, development, DevOps — I choose the right tools for the job and build solutions that work in production and scale without pain.

Everyone knows about EXPIRE for keys.

But Redis can also remove elements from a ZSET, SET, or LIST using TTL-like logic — by storing them with a timestamp as the score and cleaning them up manually.

You don’t need cron for this. Just:

ZADD my:queue 1715366400 "job:123"

Then periodically:

ZREMRANGEBYSCORE my:queue -inf <current_time>

No real TTL. Just time that’s passed.

Redis can do TTL without TTL