PEXPIRETIME
PEXPIRETIME key
- Available since:
- Redis Open Source 7.0.0
- Time complexity:
- O(1)
- ACL categories:
-
@keyspace,@read,@fast, - Compatibility:
- Redis Software and Redis Cloud compatibility
PEXPIRETIME has the same semantic as EXPIRETIME, but returns the absolute Unix expiration timestamp in milliseconds instead of seconds.
Examples
Redis Software and Redis Cloud compatibility
| Redis Software |
Redis Cloud |
Notes |
|---|---|---|
| ✅ Standard |
✅ Standard |
Return information
One of the following:
- Integer reply: Expiration Unix timestamp in milliseconds.
- Integer reply:
-1if the key exists but has no associated expiration time. - Integer reply:
-2if the key does not exist.