Exam DVA-C02 All QuestionsBrowse all questions from this exam
Question 372

A company runs an ecommerce application on AWS. The application stores data in an Amazon Aurora database.

A developer is adding a caching layer to the application. The caching strategy must ensure that the application always uses the most recent value for each data item.

Which caching strategy will meet these requirements?

    Correct Answer: B

    In a write-through caching strategy, every time an item is written to the database, it is also written to the cache. This ensures that the cache always contains the most recent value immediately after any write operation. Therefore, any subsequent read operation can fetch the most recent value directly from the cache, ensuring data consistency between the cache and the database.

Discussion
rdiazOption: B

Write-Through Caching (Option B): With a write-through caching strategy, every time an item is written to the database, it is also written to the cache. This ensures that the cache is always updated with the most recent value immediately after any write operation. Consequently, any read operation can fetch the most recent value directly from the cache, ensuring data consistency between the cache and the database.