Chapter 16. Djangos Cache Framework

A fundamental trade-off in dynamic websites is, well, they're dynamic. Each time a user requests a page, the web server makes all sorts of calculations, from database queries to template rendering to business logic to creating the page that your site's visitors see. This is a lot more expensive, from a processing-overhead perspective, than your standard read-a-file-off-the-filesystem server arrangement.

For most web applications, this overhead isn't a big deal. Most web applications aren't www.washingtonpost.com or www.slashdot.org; they're simply small- to medium-sized sites with so-so traffic. But for medium-to high-traffic sites, it's essential to cut as much overhead as possible.

That's where caching comes ...

Get Mastering Django: Core now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.