Setting Expiry

Difficulty: Beginner

Question

How do you set a key to expire in 60 seconds?

Answer

Use the `EXPIRE key 60` command.

Concepts covered

TTL, EXPIRE, PEXPIRE