Engineering Decisions · Senior · Question 2 of 14
A store serves product pages from a global CDN. Descriptions rarely change, but a corrected price must appear within seconds. What's the caching strategy?
- 1A long CDN TTL plus tag-based purges on change
- 2No CDN for product pages, serving from the origin
- 3A short TTL of 5 seconds on all product pages
Show the answer
Correct answer: A long CDN TTL plus tag-based purges on change
Explanation
A long TTL keeps the hit rate high, and purging by tag applies a price fix everywhere within seconds. A short TTL fits content with no change events to hook into, but it sends far more traffic to the origin. Skipping the CDN fits fully personalized pages, and here it would give up speed for visitors around the world.