How to get the expire date from a , I am using Predis to cache the data in hash format. Sample : $redis->hset("taxi_car", "brand", "Toyota");
Asked
Active
Viewed 6,934 times
1 Answers
0
You can use TTL
or PTTL
to get the remaining time to live of the key, i.e. taxi_car. The difference is that the latter returns TTL in milliseconds.

for_stack
- 21,012
- 4
- 35
- 48
-
Thanks it works but i am looking for a way to do it using predis php library. – Lionel Dcosta Oct 17 '16 at 07:11
-
predis should have something like: `$redis->ttl("taxi_car")`, you can try it. – for_stack Oct 17 '16 at 07:34