April 10, 2014
in Blog.
sudo apt-get install memcached libmemcached-dev
sudo pip install pylibmc
Add to settings.py
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.PyLibMCCache',
'LOCATION': '127.0.0.1:11211',
}
}
Add to middleware
'django.middleware.cache.UpdateCacheMiddleware',
...
'django.middleware.cache.FetchFromCacheMiddleware',