August 2016
Beginner to intermediate
717 pages
15h 24m
English
Django provides a possibility to speed up the request-response cycle by caching the most expensive parts such as database queries or template rendering. The fastest and most reliable caching natively supported by Django is the memory-based cache server, Memcached. In this recipe, you will learn how to use Memcached to cache a view for our viral_videos app that we created in the Using database query expressions recipe earlier in this chapter.
There are several things to do in order to prepare caching for your Django project:
$ wget http://memcached.org/files/memcached-1.4.23.tar.gz $ tar -zxvf memcached-1.4.23.tar.gz $ cd memcached-1.4.23 $ ./configure && make ...
Read now
Unlock full access