According to redis doc:
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). A timestamp in the past will delete the key immediately.
While setting past timestamp, I'm getting exactly same behavior as per doc except there is no key expiry event thrown.
redis> SET mykey "Hello"
"OK"
redis> EXISTS mykey
(integer) 1
redis> EXPIREAT mykey 1293840000
(integer) 1
redis> EXISTS mykey
(integer) 0
It throws key expiry event upon key expire when I set future timestamp in EXPIREAT
command.
So is it not supported to get key expiry event while setting past timestamp through EXPIREAT
?