This repository has been archived by the owner on May 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 76
PEXPIRE
Josh Baker edited this page Oct 11, 2016
·
7 revisions
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 if key does not exist or the timeout could not be set.
> SET mykey "Hello"
OK
> PEXPIRE mykey 1500
(integer) 1
> TTL mykey
(integer) 1
> PTTL mykey
(integer) 1497
APPEND, BITCOUNT, BITOP, BITPOS, DBSIZE, DECR, DECRBY, DEL, EXISTS, EXPIRE, EXPIREAT, FLUSHDB, GET, GETBIT, GETRANGE, GETSET, INCR, INCRBY, INCRBYFLOAT, KEYS, MGET, MSET, MSETNX, PDEL, PERSIST, PEXPIRE, PEXPIREAT, PTTL, RENAME, RENAMENX, SET, SETBIT, SETRANGE, STRLEN, TTL