

Upstream caching is dependent on a definition of its longevity. To be clear, this isn’t denormalization but rather an entirely temporary hub of data. So upstream cache’s purpose is to save the results of expensive calculations so that they don’t need to be done again only to provide the same result. Examples: Cloudfront and other CDNs, or a Squid or Varnish proxy server.These caches are at the page-level of a website.Downstream caches are services that users talk to that live further downstream from your servers, toward the user.These caches can include computed data, content fragments, and syndicated content.Upstream caches are services your servers talk to that live further upstream, away from the user.The bulleting below summarizes the two options in terms of placement and purpose: Both can transform the speed of your system.

Upstream cache, on the other hand, can deliver pages faster with fewer server resources by re-using calculated values and content fragments generated during one page view for future page views. We added the downstream cache to deliver pages faster with fewer server resources by re-serving a page generated for one request to future requests for the same page.

The Golden Rule for Django Developers is “Don’t prematurely optimize code.” But when a website goes live, user demand can outweigh site functionality, meaning slower page loads and a downgraded user experience.
