Installing Memcached

We are going to use the Memcached backend. Memcached runs in memory and it is allotted a specified amount of RAM. When the allotted RAM is full, Memcached starts removing the oldest data to store new data.

Download Memcached from https://memcached.org/downloads. If you are using Linux, you can install Memcached using the following command:

./configure && make && make test && sudo make install

If you are using macOS X, you can install Memcached with the Homebrew package manager using the command brew install memcached. You can download Homebrew from https://brew.sh/.

After installing Memcached, open a shell and start it using the following command:

memcached -l 127.0.0.1:11211

Memcached will run on port 11211 by default. ...

Get Django 2 by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.