You are adding a caching layer in front of an Amazon Aurora database and must ensure the application always reads the most up-to-date value for each item. Which caching strategy satisfies this requirement?
Choose an answer
Tap an option to check your answer.
Correct answer: Use a write-through cache for all create and update operations..
Why this is the answer
A write-through cache ensures data consistency by writing data to both the cache and the backing database simultaneously. This guarantees that the cache always contains the most up-to-date value, satisfying the requirement for always reading the latest data. Applying a TTL helps manage cache staleness but doesn't guarantee immediate consistency upon write. Lazy loading (load on demand) and read-through caching only populate the cache when data is requested, meaning the first read after a write might still hit the database if the item isn't in the cache, or retrieve stale data if the cache wasn't updated. These strategies prioritize read performance and cache efficiency over immediate write consistency.
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