I'm setting up Johnny Cache alongside template caching using Django 1.4. Our current setup looks like this:
# Django Cache
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': '192.168.100.1:11211',
}
}
# JohnnyCache
JOHNNY_CACHE_BACKEND = "memcached://192.168.100.1:11211/"
MAN_IN_BLACKLIST = ('django_session',...)
JOHNNY_CACHE_BACKEND has been deprecated, so we need to move johnny setting inside our caches dictionary. Per the documenataion, this seems easy enough. But, what happens to our template caching? Do these settings live alongside each other, like this?
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': '192.168.100.1:11211',
}
'default' : dict(
BACKEND = 'johnny.backends.memcached.MemcachedCache',
LOCATION = ['192.168.100.1:11211'],
JOHNNY_CACHE = True,
)
}
Or is johnny.backends.memcached.MemcachedCache a replacement for django.core.cache.backends.memcached.MemcachedCache, in which case we should just have this:
CACHES = {
'default' : dict(
BACKEND = 'johnny.backends.memcached.MemcachedCache',
LOCATION = ['192.168.100.1:11211'],
JOHNNY_CACHE = True,
)
}
Which would handle query and template caching. Any insights would be greatly appreciated.