Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

PEXPIREAT

Josh Baker edited this page Oct 11, 2016 · 7 revisions

PEXPIREAT key milliseconds-timestamp

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.

Return value

Integer reply, specifically:

  • 1 if the timeout was set.
  • 0 if key does not exist or the timeout could not be set (see: EXPIRE).

Examples

> SET mykey "Hello"
OK
> PEXPIREAT mykey 1555555555005
(integer) 1
> TTL mykey
(integer) 79416613
> PTTL mykey
(integer) 79416612543

Related Commands

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

Clone this wiki locally