Design High-Performing Architectures
An application checks Amazon ElastiCache before reading its database. After a cache miss, it repeatedly queries the database for the same unchanged record because the cache remains empty. Which change should the application make?
Show the answer
Correct answerA. Store the database result in the cache after each cache miss
AWhy this is right: Saving the fetched result allows subsequent requests for the same record to be served from the cache.
BWhy not this: More database connections do not prevent repeated database reads for an uncached record.
CWhy not this: A read replica changes where database reads execute but leaves the cache empty.
DWhy not this: Preloading every record can waste capacity and is unnecessary when records can be cached on demand.
Cache-aside populates the cache with data fetched from the database after a miss, allowing later requests to use the cached result. A read replica can offload the primary database but does not populate the cache.