Search…
⌘K
Ask AI
⌘I
Discord
Blog
Twitter
Console
Overview
Redis
Vector
QStash
Workflow
Search
Box
Realtime
Developer API
Redis
SDKs
Typescript
Commands
Generic
PTTL
Return the expiration in milliseconds of a key.
1 min read
Copy as Markdown
Arguments
#
key
string
required
#
The key
Response
#
PEXPIREAT
RANDOMKEY
Example
const
millis
=
await
redis.
pttl
(key);