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
EXPIREAT
Josh Baker edited this page Oct 11, 2016
·
7 revisions
EXPIREAT has the same effect and semantic as EXPIRE, but instead of specifying the number of seconds representing the TTL (time to live), it takes an absolute Unix timestamp (seconds since January 1, 1970).
Please for the specific semantics of the command refer to the documentation of EXPIRE.
Integer reply, specifically:
- 1 if the timeout was set.
- 0 if key does not exist or the timeout could not be set (see: EXPIRE).
> SET mykey "Hello"
OK
> EXISTS mykey
(integer) 1
> EXPIREAT mykey 1293840000
(integer) 1
> EXISTS mykey
(integer) 0
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