Welcome to Django Better Cache’s documentation!

Better Cache originally provided a replacement {% cache %} tag, but as of version 0.7 includes a Cache ORM module and a suite of caching and proxy tools. Overall, the aim is to simplify and empower your use of caches with sane defaults and obvious behaviors.

Table of Contents

Template Tag

The bettercache cache template tag provides some automatic invalidation.

Cache ORM

Caching can be more than a string and random object. bettercache.objects provides an ORM interface to structure caching and manage keys for you, replacing a mix-mash of adhoc key generation and fragile object pickling with stable cache models and key management, via the cachemodel.


Bettercache middleware serves as an improved version of the django caching middleware allowing better control of cache headers and easier to generate cache keys.

Celery Task

The bettercache celery task allows most pages to be updated offline in a post check fashion. This means a user never has too wait for a slow page when serving a cached one would be acceptable.

Proxy Server

The bettercache proxy server can serve pages cached by the bettercache middleware and deal with updating via the celery task.

Cache Backend

Currently not implemented this will be a django 1.3 compatible caching backend with stampede prevention and check and set support


You can make suggestions and seek assistance on the mailing list:



Fork and send pull requests, please!


Indices and tables