Skip to content

EXPIRETIME

EXPIRETIME key

EXPIRETIME returns the absolute timestamp in Unix seconds at which the given key will expire.

The command returns -1 if the key exists but has no associated expiration time. The command returns -2 if the key does not exist.

localhost:7379> SET k1 v1
OK
localhost:7379> EXPIRE k1 10
OK true
localhost:7379> EXPIRETIME k1
OK 1744451192