You run Azure Cache for Redis Enterprise and want a worker to react when keys expire or are evicted due to memory pressure. The worker subscribes to __keyevent@0__:* channels. What configuration change is required to publish these events?
Choose an answer
Tap an option to check your answer.
Correct answer: Set notify-keyspace-events to "Exe" so keyevent notifications for expired and evicted keys are published..
Why this is the answer
The correct configuration for notify-keyspace-events to publish keyevent notifications for expired and evicted keys is "Exe". The 'E' flag enables keyevent notifications, 'x' specifically for expired events, and 'e' for evicted events. Therefore, "Exe" covers both scenarios. Setting it to "Kx" would only publish keyspace notifications for expired keys, not keyevent notifications, and would miss evicted keys. Setting it to "A" enables all notifications, which is broader than necessary and might include unwanted events, though it would technically include 'x' and 'e'. Setting it to "gE" is incorrect as 'g' enables generic commands, and 'E' is not a valid flag for this purpose; the correct flag for keyevent notifications is 'E'.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed