2

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");

Lionel Dcosta
  • 177
  • 1
  • 2
  • 13

1 Answers1

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