Databases · Junior · Question 57 of 75
What does EXPIRE session:42 3600 do in Redis?
- 1Extends the key's value to 3600 characters
- 2Locks the key for 3600 seconds
- ✓Correct answer: Deletes the key automatically after 3600 seconds
Explanation
TTLs make Redis a natural fit for caches and sessions: old data cleans itself up. SET key value EX 3600 sets the value and TTL in one command.