PSETEX key milliseconds value
相关命令
- APPEND
 - BITCOUNT
 - BITOP
 - BITPOS
 - DECR
 - DECRBY
 - GET
 - GETBIT
 - GETRANGE
 - GETSET
 - INCR
 - INCRBY
 - INCRBYFLOAT
 - MGET
 - MSET
 - MSETNX
 - PSETEX
 - SET
 - SETBIT
 - SETEX
 - SETNX
 - SETRANGE
 - STRLEN
 
Available since 2.6.0.
时间复杂度: O(1)
PSETEX works exactly like SETEX with the sole difference that the expire time is specified in milliseconds instead of seconds.
例子
redis> PSETEX mykey 1000 "Hello"
- OK
 
redis> PTTL mykey
- (integer) 999
 
redis> GET mykey
- "Hello"
 
This website is open source software developed by Citrusbyte.
The Redis logo was designed by Carlos Prioglio. See more credits.
 
 