Django Memcached

Make Django Memcached super easy with Redis Enterprise

Using Memcached with Django

To use Memcached as a cache for your Django website
edit your Django’s file as described in the “Django’s cache framework” page of Django’s documentation. Add the following CACHE settings to

os.environ[‘MEMCACHE_SERVERS’] = ‘hostname:port’ os.environ[‘MEMCACHE_USERNAME’] = ‘username’
os.environ[‘MEMCACHE_PASSWORD’] = ‘password’


 'default': {
     'BACKEND': 'django.core.cache.backends.memcached.PyLibMCCache',
     'BINARY': True


Note: make sure you have django-pylibmc installed on your Django server by running the following command:

$ sudo pip install django-pylibmc

Redis Enterprise enables running Memcached buckets in a highly available and auto-scalable manner, with predictable top performance.

Redis Enterprise Software lets you install an enterprise grade Memcached cluster in your environment of choice, whether an on-premises data-center or your preferred cloud platform. It gives you full control of your data and configuration – no clustering or sharding knowledge required!

Memcached Cloud is a fully managed cloud service for hosting and running Memcached datasets in a highly available and scalable manner, with predictable and stable top performance. It provides a storage engine for standard Memcached, as well as in-memory replication and instant auto-failover within the same data center or across data centers. The service completely frees developers from dealing with nodes, clusters, scaling, data persistence issues or failure recovery.

For more information on using Redis’ products and services with Django please see the Howto page.