Actions37
- Append
- Blocking Pop Left
- Blocking Pop Right
- Delete
- Eval
- Exists
- Expire At
- Get
- Get Set
- Hash Exists
- Hash Keys
- Hash Length
- Hash Values
- Increment
- Info
- JSON Get
- JSON Set
- Keys
- List Length
- Multi Get
- Multi Set
- Persist
- Pop
- Publish
- Push
- Scan
- Set
- Set Add
- Set Cardinality
- Set Is Member
- Set Remove
- Sorted Set Add
- Sorted Set Cardinality
- Sorted Set Range
- Sorted Set Remove
- String Length
- TTL
TTL
AI-generatedSummary
Get the remaining time to live (TTL) in seconds for a specified Redis key.
Inputs
- Key (required) — The name of the key to check the TTL for.
Output shape
a single JSON object containing the key name and its TTL value in seconds
The TTL value is the number of seconds until the key expires. A TTL of -1 indicates the key exists but has no associated expiration, and -2 indicates the key does not exist.