Skill 2.1.2
Implement caching by using AWS services to enhance dynamic scalability (for example, Amazon CloudFront, Amazon ElastiCache)
Key Concepts
Amazon CloudFront caches static and dynamic content at edge locations. Cache policies define the cache key (which headers, cookies and query strings are included) and TTLs; fewer values in the key mean a higher cache hit ratio. Origin Shield adds a central caching layer that further reduces origin load.
Amazon ElastiCache (Valkey, Redis OSS or Memcached) caches database query results, sessions and computed data in memory. Lazy loading (cache-aside) fills the cache on a miss; write-through updates the cache on every write; a TTL limits staleness. ElastiCache Serverless scales automatically, while self-designed clusters scale by adding shards (cluster mode) or replicas. DynamoDB Accelerator (DAX) is a write-through cache for DynamoDB with microsecond reads.