1 | initial version |
Replace CACHES config in settings.py file with this code part
CACHES = {
'default': {
'BACKEND': 'djpymemcache.backend.PyMemcacheCache',
'LOCATION': '127.0.0.1:11211',
}
}
Install memcached on linux env
sudo apt-get install memcached or yum install memcached
and install python library to work with memcache
pip install django-pymemcache
run the memcached service in daemon mode using this command
memcached -d
Now run the Django application, It'll use the memcached service to cache the results.
2 | No.2 Revision |
Replace CACHES config in settings.py file with this code part
CACHES = {
'default': {
'BACKEND': 'djpymemcache.backend.PyMemcacheCache',
'LOCATION': '127.0.0.1:11211',
}
}
Install memcached on linux env
sudo apt-get install
yum install and install python library to work with memcache
pip install django-pymemcache
run the memcached service in daemon mode using this command
memcached -d
Now run the Django application, It'll use the memcached service to cache the results.
3 | No.3 Revision |
Replace CACHES config in settings.py file with this code part
CACHES = {
'default': {
'BACKEND': 'djpymemcache.backend.PyMemcacheCache',
'LOCATION': '127.0.0.1:11211',
}
}
Install memcached on linux env
sudo apt-get install memcached
or
yum install memcached
and install python library to work with memcache
pip install django-pymemcache
run the memcached service in daemon mode using this command
memcached -d
To activate memcached permanently do:
systemctl start memcached
systemctl enable memcached
Now run the Django application, It'll use the memcached service to cache the results.