A company hosts a three-tier web application in AWS. The database layer uses a Multi‑AZ Amazon RDS for MySQL server and the cache layer uses Amazon ElastiCache. The company wants a caching strategy that adds or updates cache data when a customer adds an item to the database, and the cache data must always match the database. Which solution meets these requirements?
Choose an answer
Tap an option to check your answer.
Correct answer: Implement the write-through caching strategy.
Why this is the answer
The write-through caching strategy is correct because it ensures data consistency. With write-through, data is written simultaneously to both the cache and the database. This guarantees that the cache always reflects the most current data in the database, meeting the requirement that cache data must always match the database when an item is added. Lazy loading (cache-aside) only loads data into the cache when it's requested, which doesn't guarantee immediate consistency with database writes. Adding TTL (Time To Live) is a cache invalidation mechanism, not a strategy for ensuring immediate consistency during writes. AWS AppConfig is a service for managing application configurations, not a caching strategy.
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