Book Image

Django 1.0 Template Development

Book Image

Django 1.0 Template Development

Overview of this book

Table of Contents (17 chapters)
Django 1.0 Template Development
Credits
About the Author
About the Reviewers
Preface
Index

Chapter 10. Caching Your Pages

The Django framework makes it easy to produce dynamic pages and generate content "on the fly" when a page is requested. Under certain circumstances, this can have a negative impact on your site's performance, such as when you start generating a large amount of traffic or if your pages use intensive database queries. In these situations, you can use the built-in caching mechanisms to reduce the amount of processing that goes into serving each request.

In this chapter, we will:

  • Explore the basics of caching output

  • Compare the different cache backends that Django offers

  • Configure your site for caching

  • Cache content on a per-view basis

  • Cache content from within Django templates

  • Use the low-level cache API to cache specific pieces of data

  • Cache your entire site automatically

  • Explore strategies for using different cache mechanisms together

  • Configure Django to work with caches other than your own