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?

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.

Further reading

Problem with a question

Engineering Decisions · Senior · question 2

Test yourself

Take the Engineering Decisions · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz