logoalt Hacker News

janalsncmtoday at 12:27 AM3 repliesview on HN

How would they know the content hasn’t changed without hitting the website?


Replies

coreqtoday at 2:36 AM

They wouldn't, well there's Etag and alike but it still a round trip on level 7 to the origin. However the pattern generally is to say when the content is good to in the Response headers, and cache on that duration, for an example a bitcoin pricing aggregator might say good for 60 seconds (with disclaimers on page that this isn't market data), whilst My Little Town news might say that an article is good for an hour (to allow Updates) and the homepage is good for 5 minutes to allow breaking news article to not appear too far behind.

OptionOfTtoday at 3:16 AM

Caching headers?

(Which, on Akamai, are by default ignored!)

cortesofttoday at 4:36 AM

Keeping track of when content changes is literally the primary function of a CDN.