Redis PEXPIREAT command
Redis PEXPIREAT command sets the key expiration time, in milliseconds. key will expire no longer available.
grammar
redis PEXPIREAT basic command syntax is as follows:
redis 127.0.0.1:6379> PEXPIREAT KEY_NAME TIME_IN_MILLISECONDS_IN_UNIX_TIMESTAMP
Available versions
> = 1.0.0
return value
Set successfully returned. When the key does not exist or can not set the expiration time for the key (for example, in less than 2.1.3 version of Redis you try to update the key expiration time) returns 0.
Examples
First, create a key and assignment:
redis 127.0.0.1:6379> SET w3bigkey redis OK
Set the expiration time for the key:
redis 127.0.0.1:6379> PEXPIREAT w3bigkey 1555555555005 (integer) 1