Why should cached keys usually have a TTL?

Practice this question from Quiz: Redis Cache Design for Interviews, with options and an explanation.

Question

Why should cached keys usually have a TTL?

Option A — Correct answer

To reduce stale data and eventually clean unused keys

Option B

To make Redis slower

Option C

To avoid all database writes

Option D

To guarantee strict consistency

Explanation

TTL limits staleness and prevents forgotten keys from living forever.

Quiz: Redis Cache Design for Interviews

All questions · Previous question · Next question

Open on QuizMaker