AWS Certified Developer – Associate — Question 270

A developer is integrating Amazon ElastiCache in an application. The cache will store data from a database. The cached data must populate real-time dashboards.

Which caching strategy will meet these requirements?

Answer options

Correct answer: D

Explanation

A write-through caching strategy ensures that data is written to both the cache and the backend database simultaneously, guaranteeing that the cache always contains the most up-to-date information for real-time dashboards. In contrast, lazy-loading only updates the cache on a cache miss, which can lead to stale data being displayed on the dashboard. Write-behind caching introduces a delay before updating the database, making it unsuitable for immediate real-time consistency.