I would like to have two caches with different timeouts on one memcached instance in my django 3 instance:
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': '127.0.0.1:11211',
'CACHE_KEY_PREFIX': 'default_cache',
'TIMEOUT': 300,
},
'custom': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': '127.0.0.1:11211',
'CACHE_KEY_PREFIX': 'custom_cache',
'TIMEOUT': 3600 * 24,
},
}
I did not find an example which does this, so I`m not sure if something could go wrong with this. What do you think? Could there e.g. be a problem with django["cachename"].clear()
command?