AWS Certified Developer Associate DVA-C02 Practice Question
Your application frequently reads user profile data that experiences peaks of read activity. User profile updates are much less frequent. To mitigate read load on the database and improve read performance, you decide to implement a caching solution. Given the need for up-to-date information and considering cost-efficiency, which caching strategy should you employ?
Implement write-through caching to ensure the cache always has the most up-to-date data
Avoid caching and allow the database to handle all read operations directly to ensure data integrity
Use a read-through caching strategy to manage the loading of data into the cache
Employ a lazy loading caching strategy with an appropriate time-to-live (TTL) to ensure data freshness
Implementing a lazy loading strategy with a time-to-live (TTL) policy is the best approach in this scenario. Under lazy loading, data is only cached when it is read, which minimizes cache maintenance overhead. By setting a TTL, stale data is automatically evicted, ensuring that the cache does not serve outdated information for long periods, thus balancing read performance with data freshness. Write-through caching would impose an unnecessary performance penalty due to infrequent updates, while no caching would fail to reduce database load. A read-through strategy would be less efficient in this context due to the infrequency of profile updates.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is lazy loading and how does it work in caching?
Open an interactive chat with Bash
What is Time-To-Live (TTL) in caching?
Open an interactive chat with Bash
How does caching improve application performance?
Open an interactive chat with Bash
AWS Certified Developer Associate DVA-C02
Development with AWS Services
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access