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 PEXPIRE command syntax
Function:This command is similar to the EXPIRE command, but it sets the key's survival time in milliseconds, not in seconds like the EXPIRE command.
Syntax: PEXPIRE key milliseconds
Available versions:>= 2.6.0
Time complexity : O(1)
Return: If the setting is successful, 1 will be returned. If the key does not exist or the setting fails, 0
will be returned.redis PEXPIRE command example
redis> SET mykey "Hello" OK redis> PEXPIRE mykey 1500 (integer) 1 redis> TTL mykey # TTL 的返回值以秒為單位 (integer) 2 redis> PTTL mykey # PTTL 可以給出準確的毫秒數(shù) (integer) 1499