TTL in redis cache

1,810 views
Skip to first unread message

naveen pajjuri

unread,
Dec 18, 2015, 9:22:15 AM12/18/15
to Redis DB
Hi everyone ,
Is there any way in redis to make cache's ttl unlimited. no expiry on cache.

regards,
Naveen Pajjuri.

Garry Shutler

unread,
Dec 18, 2015, 9:25:14 AM12/18/15
to redi...@googlegroups.com
Hi Naveen,

Not sure this is too obvious an answer but setting a TTL on a key is optional so if you don't set one there will be no expiry.

Garry


--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.
To post to this group, send email to redi...@googlegroups.com.
Visit this group at https://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.

Greg Andrews

unread,
Dec 18, 2015, 11:56:32 AM12/18/15
to redi...@googlegroups.com
If you don't select a cache eviction policy (see this page on redis.io for info), and your client code doesn't issue the commands to Redis that set TTL on keys, then Redis won't delete keys.

Are you asking a different question, such as how to remove TTLs if your client code has already issued commands to set TTL on keys?

  -Greg

--
Reply all
Reply to author
Forward
0 new messages