Articles Tagged caching
On large django projects it is more likely that to generate a single webpage multiple queries over large datasets and complex data processing must be involved. In such cases -were performance is an issue-, the use of caching techniques can really save the day. Django provides a solid framework for caching, allowing for the storage/retrieval of single values (e.g. the result of complex database queries), html code fragments (e.g. the 'footer' of your webpage) or even entire django views.
In today's article we'll examine a way to cache our menu (consider a tree-menu application like the one described in this yawd blog article or the django-treemenus application) in order to reduce loading times and save db server load. Although this appears to be a fairly straight-forward task, a couple of decisions can be tricky.Posted on November 9th, 2011 by Pantelis Petridis