PEXPIREAT key milliseconds-timestamp
相关命令
- DEL
 - DUMP
 - EXISTS
 - EXPIRE
 - EXPIREAT
 - KEYS
 - MIGRATE
 - MOVE
 - OBJECT
 - PERSIST
 - PEXPIRE
 - PEXPIREAT
 - PTTL
 - RANDOMKEY
 - RENAME
 - RENAMENX
 - RESTORE
 - SCAN
 - SORT
 - TTL
 - TYPE
 
Available since 2.6.0.
时间复杂度: O(1)
PEXPIREAT has the same effect and semantic as EXPIREAT, but the Unix time at which the key will expire is specified in milliseconds instead of seconds.
返回值
Integer reply, specifically:
1if the timeout was set.0ifkeydoes not exist or the timeout could not be set (see: EXPIRE).
例子
redis> SET mykey "Hello"
- OK
 
redis> PEXPIREAT mykey 1555555555005
- (integer) 1
 
redis> TTL mykey
- (integer) 147565735
 
redis> PTTL mykey
- (integer) 147565735323
 
This website is open source software developed by Citrusbyte.
The Redis logo was designed by Carlos Prioglio. See more credits.
 
 