EXPIREAT key timestamp

    Time complexity: O(1)

    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 (seconds since January 1, 1970). A timestamp in the past will delete the key immediately.

    EXPIREAT was introduced in order to convert relative timeouts to absolute timeouts for the AOF persistence mode. Of course, it can be used directly to specify that a given key should expire at a given time in the future.

    , specifically:

    • if does not exist.

    redis> EXISTS mykey

    redis> EXPIREAT mykey 1293840000

    redis>