Commands.app

TTL

Keys

Get time to live for a key

Examples
Common usage examples

Get TTL in seconds

TTL mykey

Get TTL in milliseconds

PTTL mykey
Notes
  • -1 means no expiry, -2 means key doesn't exist
Related Commands
You might also find these useful