I want to use multiple caching engines in one django project. In example I use sorl.thumbnail, that generated many sql queries to get/set thumbnail for model image. For caching this queries I use memcached backend. But, other caches stopped working, I mean template caching with {% cache ... %}
, and also via API cache.get(), cache.set(). I want to be something like this
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': '127.0.0.1:11211',
},
'filebased': {
'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
}
}
How can I use 'filebased' cache in template? Because {% cache %} uses memcached backend, and it produces many queries, especially using trees (django-mptt)