Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's default TTL in Redis?

Tags:

redis

ttl

I can't find anywhere online what is default TTL in Redis. I know that I can set TTL for specific SET, but don't know what is default TTL. Can someone tell me what default time to live is in Redis?

like image 400
Vedran Juriša Avatar asked Mar 06 '18 14:03

Vedran Juriša


People also ask

What is Max TTL in Redis?

The max is 9223372036854775807 not 2147483647 for expire , try it.

Can we set TTL in Redis?

No, Redis doesn't have a notion of a global/default TTL and yes, you do have to set it for each key independently.

Do Redis keys expire default?

Normally Redis keys are created without an associated time to live. The key will simply live forever, unless it is removed by the user in an explicit way, for instance using the DEL command.

What is good Redis latency?

Clients connect to Redis using a TCP/IP connection or a Unix domain connection. The typical latency of a 1 Gbit/s network is about 200 us, while the latency with a Unix domain socket can be as low as 30 us. It actually depends on your network and system hardware.


1 Answers

There is no default TTL. By default, keys are set to live forever.

like image 146
dizzyf Avatar answered Sep 22 '22 19:09

dizzyf