expire

UK[ɪkˈspaɪə(r)] US[ɪkˈspaɪr]

vi.Expiration; documents, agreements, etc. (due to expiration) become invalid; To expire; to pass away

Third person singular: expires Present participle: expiring Past tense: expired Past participle: expired

redis PEXPIREAT command syntax

Function: This command is similar to the EXPIREAT command, but it sets the key's expiration unix timestamp in milliseconds, rather than in seconds like EXPIREAT.

Syntax: PEXPIREAT key milliseconds-timestamp

Available versions: >= 2.6.0

Time Complexity: O(1)

Return: If the survival time is set successfully, return 1. When the key does not exist or the survival time cannot be set, 0 is returned.

redis PEXPIREAT command example

redis> SET mykey "Hello"
OK
redis> PEXPIREAT mykey 1555555555005
(integer) 1
redis> TTL mykey           # TTL 返回秒
(integer) 223157079
redis> PTTL mykey          # PTTL 返回毫秒
(integer) 223157079318