O'Reilly logo

Django Unleashed by Andrew Pinkham

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

29.4.3 Caching with Memcache

In Chapter 26, we discussed how to limit the amount of work our website has to do. One way to avoid work is to cache results. At the end of the chapter, we disabled our site-wide caching settings to make development easier. In this section, we reenable caching and configure our caching to work with one of the industry’s fastest out-of-the-box in-memory caches: Memcache.

At the time of writing, there are two services that provide access to managed memcache services on the Heroku platform: the Memcached Cloud and Memcachier. I opt to use Memcachier. The first step, as always, is to read the documentation (Example 29.58).

Example 29.58: Shell Code

$ heroku addons:docs memcachier

Info ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required