djangosnippets.org: Latest snippets posted by isaidyephttps://djangosnippets.org/users/isaidyep/2010-09-13T08:17:29.218976-05:00isaidyepMultiple cache backend
2010-09-13T08:17:29.218976-05:00isaidyephttps://djangosnippets.org/snippets/2193/<p>Sometimes you might find useful to cache a value in different backends.
Just put this code in a file named "multicache.py" somewhere in your python path and set it in CACHE_BACKEND setting:</p>
<p>CACHE_BACKEND = 'multicache://?fallback=1&backends=file:///var/tmp/django_cache,locmem://'</p>
<p>Separate the backends settings with commas, the first one will be set as default.
Setting …</p>
Freely redistributable