Pick the fix
A product price changes and must update on 40 cached CDN pages within seconds. Best approach?
Hint 1 of 1
How do you find the 40 pages?
Choose an answer, then open Show answer below to check it.
Show answer
Answer: A Tag pages with the product's surrogate key and purge that tag on update
Correct. One call purges exactly the affected pages.
A surrogate key (cache tag) groups every cached page that depends on one product. Purging that tag invalidates just those 40 pages within seconds and leaves the rest of the cache warm.
Why not the others?
- B Purge the entire CDN. Works, but empties everything and spikes the origin.
- C Set max-age to 1 day. Prices would be stale for up to a day.
- D Disable the CDN for product pages. Gives up the benefit for all reads.