Databases · Junior · Question 57 of 75

What does EXPIRE session:42 3600 do in Redis?

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.

Further reading

Problem with a question

Databases · Junior · question 57

Test yourself

Take the Databases · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz