November 2015
Beginner to intermediate
840 pages
26h 30m
English
Why optimize queries or cache template files when we can cache the results of our computations? Django allows us to easily cache the output of views, with templates rendered and middleware already having worked their magic.
Django provides several kinds of caches. For our purposes, we use the local memory cache, which simply keeps computer webpages in memory. When we deploy, we will switch to using a cache for memcache.
It is possible to define multiple different caches, each of which might fulfill a different purpose. In our case, we simply define a single cache called default. The BACKEND key tells the cache what kind of cache it is, while the location gives the cache a unique identifier (used separately from ...
Read now
Unlock full access