Correct Answer: Implement the Cache-Aside pattern: check Redis for the key, return cached data if present (cache hit), or fetch from SQL and write to Redis with a 10-minute TTL on a cache miss
The Cache-Aside (Lazy Loading) pattern is the standard approach for caching database results. On a cache miss, the application fetches from the source database and writes to Redis ...
Correct Answer
Implement the Cache-Aside pattern: check Redis for the key, return cached data if present (cache hit), or fetch from SQL and write to Redis with a 10-minute TTL on a cache miss
Why This Answer Is Correct
The Cache-Aside (Lazy Loading) pattern is the standard approach for caching database results. On a cache miss, the application fetches from the source database and writes to Redis with a TTL. All subsequent requests within the TTL window are served from Redis, dramatically reducing database load.
This question evaluates your knowledge of Azure Cache for Redis โ a core concept tested in Microsoft Certified: Azure Developer Associate (AZ-204). Understanding Azure Cache for Redis is essential for designing scalable, secure, and cost-effective cloud architectures. Mastery of this topic will help you answer scenario-based questions confidently on exam day.
Your ASP.NET Core application experiences database overload during peak traffic because the same product catalog queries run thousands of times per minute. You add Azure Cache for Redis to cache query results. Which caching pattern should you implement to ensure stale data is never served indefinitely?
You are implementing distributed session management for a horizontally scaled ASP.NET Core app using Azure Cache for Redis. After deployment, some users are getting logged out unexpectedly between requests. What is the most likely cause?