Adding Memcached to your project

Let's configure the cache for our project. Edit the settings.py file of the educa project and add the following code to it:

CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': '127.0.0.1:11211',
}
}

We are using the MemcachedCache backend. We specify its location using the address:port notation. If you have multiple Memcached instances, you can use a list for LOCATION.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.205.27