PSETEX
Deprecated
As of Redis version 2.6.12, this command is regarded as deprecated.
It can be replaced by SET with the PX argument when migrating or writing new code.
PSETEX key milliseconds value
- Available since:
- Redis Open Source 2.6.0
- Time complexity:
- O(1)
- ACL categories:
-
@write,@string,@slow, - Compatibility:
- Redis Software and Redis Cloud compatibility
PSETEX works exactly like SETEX with the sole difference that the expire
time is specified in milliseconds instead of seconds.
Required arguments
key
The name of the key.
milliseconds
The time to live, in milliseconds.
value
The value to set.
Examples
Redis Software and Redis Cloud compatibility
| Redis Software |
Redis Cloud |
Notes |
|---|---|---|
| ✅ Standard |
✅ Standard |
Return information
Simple string reply:
OK.