Question 180
A Redis-based feature cache stores data under the same simple key for staging and production. Which engineering change is the most direct response to the stated failure and constraint?
Explanation
Correct Answer
This remedy fits the observed case: A Redis-based feature cache stores data under the same simple key for staging and production. Prefix keys with environment and application identity and enforce separation. The underlying issue is Shared key namespaces mix unrelated environments. Direct acceptance evidence is Staging updates do not mutate production cache values for the same logical feature.
Incorrect Answers
Absent expirations retain stale sessions beyond approved validity. This is a separate requirement; the current case instead hinges on: Shared key namespaces mix unrelated environments. The matching answer is: Prefix keys with environment and application identity and enforce separation.
The alternative addresses: Uncoordinated last-writer-wins cache updates allow older data to replace newer data. The reported constraint here is different: Shared key namespaces mix unrelated environments. The case-specific choice is: Prefix keys with environment and application identity and enforce separation.
Simultaneous expiry sends many duplicate reads to the database. By contrast, the relevant technical condition here is: Shared key namespaces mix unrelated environments. The appropriate selection is: Prefix keys with environment and application identity and enforce separation.