I am hosting two sites from my Django code base and I am using Johnny Cache for caching.
I have individual settings.py and manage.py for both the sites.
I have configured Johnny Cache for both of them. Now, what is required is that they share the cache. All in all, it is required that if something is changed on Site1, the same should reflect on Site2 (using cache).
I have tried many things like defining the CACHES
, CACHE_BACKEND
, JOHNNY_MIDDLEWARE_KEY_PREFIX
, CACHE_PREFIX
settings. But all in vain.
I think I am missing something, but can not figure it out.
UPDATE:
The settings:
CACHES = {
'default': {
'BACKEND': 'johnny.backends.locmem.LocMemCache',
'LOCATION': 'project-default',
'JOHNNY_CACHE': True
}
}
CACHE_BACKEND = 'default'
JOHNNY_MIDDLEWARE_KEY_PREFIX='jc_pc'
CACHE_TIMEOUT = 10000
CACHE_PREFIX = 'pc'