Command
TTL keyExplanation
Returns the remaining time to live of a key that has a timeout.
Examples
Check expiration time
TTL session:1234TTL keyReturns the remaining time to live of a key that has a timeout.
Check expiration time
TTL session:1234