SAA-C03 exam dumps

SAA-C03 practice question 492 of 553

AWS Certified Solutions Architect - Associate. Associate level, Amazon Web Services. Free question with the correct answer and a full explanation.

SAA-C03 Question 492

Single answer

An e-commerce company is experiencing high latency when retrieving frequently accessed product data from its relational database. To improve performance, they want to implement a caching strategy. They need the solution to automatically invalidate the cache when data in the database changes. Which solution is the MOST appropriate for this requirement?

  1. A

    Use Amazon ElastiCache with a write-through caching strategy.

  2. B

    Use Amazon ElastiCache with a lazy-loading caching strategy.

  3. C

    Use Amazon ElastiCache with a TTL (Time-to-Live) expiration policy.

  4. D

    Use Amazon ElastiCache with DynamoDB Streams to implement cache invalidation.

Show answer and explanation

Correct answer: D

Explanation

To meet the requirement of automatically invalidating the cache when data in the database changes, the most appropriate solution is to use Amazon ElastiCache with DynamoDB Streams. DynamoDB Streams can capture database changes in real-time, and you can use them to trigger cache invalidation logic, ensuring the cache remains up-to-date with the database. Other options, such as write-through or lazy-loading strategies, do not provide real-time invalidation for changes made directly to the database.

  • A. Incorrect.

    A write-through caching strategy automatically updates the cache whenever a write is made to the database. However, it does not automatically detect changes made directly to the database by other processes, making it unsuitable for this scenario.

  • B. Incorrect.

    A lazy-loading strategy fetches data into the cache only when it is requested and not found in the cache. It does not handle automatic cache invalidation when database changes occur.

  • C. Incorrect.

    Using a TTL (Time-to-Live) expiration policy can help ensure cached data is periodically refreshed, but it does not provide real-time invalidation when the database changes occur.

  • D. Correct.

    Using Amazon ElastiCache with DynamoDB Streams allows you to listen to changes in the database in real-time and implement automatic cache invalidation, making it the most appropriate solution for this requirement.

Timed practice exam

Take a SAA-C03 practice test under exam conditions

65 questions in 130 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam