DVA-C02 Exam QuestionsBrowse all questions from this exam

DVA-C02 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?

Show Answer
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

1 comment
Sign in to comment
rdiazOption: B
Jul 12, 2024

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.