Login

Snippets by isaidyep

Snippet List

Multiple cache backend

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: CACHE_BACKEND = 'multicache://?fallback=1&backends=file:///var/tmp/django_cache,locmem://' Separate the backends settings with commas, the first one will be set as default. Setting fallback to 1 provides fallback to default backend.

Read More

isaidyep has posted 1 snippet.