A company implements an auditing application that processes financial messages. The application uses an Azure Cache for Redis instance to store temporary transaction states. It is critical that no cached transaction states are evicted under memory pressure, as this would cause auditing mismatches. Instead, if the cache memory limit is reached, the application must receive errors so it can temporarily throttle ingestion. Which eviction policy should you configure for the Azure Cache for Redis instance?
- Avolatile-lru
- Ballkeys-lru
- noevictionAnswer
- Dvolatile-ttl
Answer
noeviction
The correct policy is noeviction because it is the only policy that does not automatically delete keys when the cache fills up. Instead, it returns an out-of-memory (OOM) error on write operations, which allows the application to detect the limit and throttle message ingestion.
Step-by-Step Solution
Key Concept
Azure Cache for Redis Eviction Policies