In Redis, how do I get the expiration date of a key?

28,266
TTL key

See the documentation of the TTL command.

There is also a PTTL command since Redis 2.6 that returns the amount of time in milliseconds instead of seconds.

Share:
28,266

Related videos on Youtube

TIMEX
Author by

TIMEX

Updated on February 12, 2020

Comments

  • TIMEX
    TIMEX over 4 years

    What's the command I use to see how many seconds are remaining?