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

Exploring the available cache systems


The Django cache framework offers a variety of cache backends with a consistent interface. This gives you the flexibility to store your cached data as you see fit and change it later without having to change any of your code. For example, you can use the filesystem as the cache backend while your site is small, and upgrade to the Memcached backend later without having to change the code in your views.

Let's briefly look at the different cache backend options.

Filesystem caching

This backend saves the cached data to a file on the local filesystem. This is a great starter option for caching as it is easy to set up, works well on shared hosting environments, and doesn't rely on the database, thus reducing the number of reads and writes. You are limited, however, by the speed of reading and writing to the server's hard drive (also known as disk I/O).

Database caching

This backend uses a special database table to store its cached data. Like the filesystem...