Backends

Johnny provides two backends, both of which are subclassed versions of django builtins that cache “forever” when passed a 0 timeout. These are essentially the same as mmalone’s inspiring django-caching application’s cache backend monkey-patch.

memcached

Infinite caching memcached class. Caches forever when passed a timeout of 0. To use, change your CACHE_BACKEND setting to something like this:

CACHE_BACKEND="johnny.backends.memcached://.."

locmem

Infinite caching locmem class. Caches forever when passed timeout of 0.

This actually doesn’t cache “forever”, just for a very long time. On 32 bit systems, it will cache for 68 years, quite a bit longer than any computer will last. On a 64 bit machine, your cache will expire about 285 billion years after the Sun goes red-giant and destroys Earth.

To use, change your CACHE_BACKEND setting to something like this:

CACHE_BACKEND="johnny.backends.locmem://.."

Table Of Contents

Previous topic

The LocalStore Cache