This command works exactly like EXPIRE but the time to live of the key is specified in milliseconds instead of seconds.
Integer reply, specifically:
1
if the timeout was set.0
ifkey
does not exist or the timeout could not be set.
例子
redis>
SET mykey "Hello"
OKredis> PEXPIRE mykey 1500
(integer) 1redis> TTL mykey
(integer) 1redis> PTTL mykey
(integer) 1499