StudyToCert

All certifications / Developer Associate / Lessons

AWS Certified Developer – Associate DVA-C02 · Domain 1: Development with AWS Services

Caching strategies with ElastiCache: lazy loading, write-through, TTLs; choosing between SQL, NoSQL and in-memory stores

▶ Watch the overview video

Last reviewed October 6, 2026 · Leer en español

Explain it simpler

A cache is a small, very fast memory that keeps copies of things people ask for often, like keeping your most-used spices on the counter instead of in the basement pantry. Lazy loading means you only put a spice on the counter after someone asks for it once. Write-through means every time you buy a spice, you put a copy on the counter right away. A TTL, short for time to live, is an expiration sticker that says toss this after ten minutes, so old copies do not hang around. Different stores suit different jobs: a relational database for related tables and complex questions, NoSQL for huge scale with simple lookups, and memory for speed.

Every weekday at 9 a.m. the Morning Ledger, a regional news site, publishes its top story, and every weekday at 9:01 the Aurora database behind it groans as tens of thousands of readers request the same article. Ines, the lead developer, adds a cache and the site flies, until an editor corrects a wrong headline and readers keep seeing the old one for an hour. A colleague suggests updating the cache on every write instead, but another warns the cache will fill with articles nobody reads. Then someone asks whether the comment system should move to DynamoDB, and whether the cache could just replace the database entirely. Which strategy, which engine, which store?

A cache keeps frequently read data in fast memory so your application does not hit the database for every request. That lowers latency for users and reduces load and cost on the database. Amazon ElastiCache is a managed in-memory service that runs the Redis OSS, Valkey or Memcached engines, handling provisioning, patching and failover for you. The AWS Certified Developer – Associate (DVA-C02) exam asks how to populate and expire a cache, which engine to pick, and when a different type of data store is the right choice altogether.

Free account

Keep reading for free

Create a free StudyToCert account to read the rest of this lesson: 8 more sections, 6 key terms, a real-world example, an exam tip and self-check questions. Every lesson, lab and practice test is free with an account.

Sign up free Log in

Study Developer Associate for free
A week-by-week plan with every lesson, quizzes, checkpoint tests, a practice exam and hands-on labs.
Open the Developer Associate study plan