Expire at Timestamp

Difficulty: Beginner

Question

How do you set a key to expire at a specific UNIX timestamp?

Answer

Use the `EXPIREAT key <timestamp>` command.

Concepts covered

TTL, UNIX time