AWS Certified Developer Associate DVA-C02 Practice Question
Your application frequently reads user profile data that can experience sudden spikes in traffic, while profile updates occur only occasionally. To reduce database load and latency you plan to add a cache. You also want to minimize operating costs and ensure profiles are not served stale for long periods. Which caching approach best satisfies these requirements?
Implement write-through caching to keep the cache synchronized with every database update
Employ a lazy-loading caching strategy with an appropriate time-to-live (TTL) to maintain freshness
Avoid caching and continue to serve all reads directly from the database
Use a read-through caching layer so the cache automatically fetches data on a miss
Use a lazy-loading (cache-aside) strategy combined with an appropriate TTL. The cache is populated only when a profile is requested, so seldom-read items do not consume memory or increment cache charges. The TTL automatically expires entries after a set interval, ensuring the cache is periodically refreshed and limiting the window during which stale data could be served. Write-through would duplicate every infrequent update into the cache, adding latency and storing data that may never be read. Read-through offers similar lazy population but requires additional middleware without providing a cost or freshness advantage in this scenario. Not caching would leave the database exposed to the bursty read load you are trying to avoid.
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 in caching?
Open an interactive chat with Bash
What is TTL in caching, and why is it important?
Open an interactive chat with Bash
How does lazy loading with TTL compare to write-through caching?
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...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .