nerdexam
Microsoft

AZ-204 · Question #312

You are developing a web application that uses Azure Cache for Redis. You anticipate that the cache will frequently fill and that you will need to evict keys. You must configure Azure Cache for…

The correct answer is B. allkeys-lru C. volatile-lru. B: The allkeys-lru policy evict keys by trying to remove the less recently used (LRU) keys first, in order to make space for the new data added. Use the allkeys-lru policy when you expect a power- law distribution in the popularity of your requests, that is, you expect that a…

Submitted by brentm· Mar 30, 2026Monitor, troubleshoot, and optimize Azure solutions

Question

You are developing a web application that uses Azure Cache for Redis. You anticipate that the cache will frequently fill and that you will need to evict keys. You must configure Azure Cache for Redis based on the following predicted usage pattern: A small subset of elements will be accessed much more often than the rest. You need to configure the Azure Cache for Redis to optimize performance for the predicted usage pattern. Which two eviction policies will achieve the goal? NOTE: Each correct selection is worth one point.

Options

  • Anoeviction
  • Ballkeys-lru
  • Cvolatile-lru
  • Dallkeys-random
  • Evolatile-ttl
  • Fvolatile-random

How the community answered

(40 responses)
  • A
    8% (3)
  • B
    73% (29)
  • D
    15% (6)
  • E
    3% (1)
  • F
    3% (1)

Explanation

B: The allkeys-lru policy evict keys by trying to remove the less recently used (LRU) keys first, in order to make space for the new data added. Use the allkeys-lru policy when you expect a power- law distribution in the popularity of your requests, that is, you expect that a subset of elements will be accessed far more often than the rest. C: volatile-lru: evict keys by trying to remove the less recently used (LRU) keys first, but only among keys that have an expire set, in order to make space for the new data added. Note: The allkeys-lru policy is more memory efficient since there is no need to set an expire for the key to be evicted under memory pressure. https://redis.io/topics/lru-cache

Topics

#Azure Cache for Redis#eviction policy#LRU#cache optimization

Community Discussion

No community discussion yet for this question.

Full AZ-204 Practice