<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom"><title>Simon Willison's Weblog: template</title><link href="http://simonwillison.net/" rel="alternate"/><link href="http://simonwillison.net/tags/template.atom" rel="self"/><id>http://simonwillison.net/</id><updated>2009-05-19T01:34:35+00:00</updated><author><name>Simon Willison</name></author><entry><title>Django tip: Caching and two-phased template rendering</title><link href="https://simonwillison.net/2009/May/19/twophased/#atom-tag" rel="alternate"/><published>2009-05-19T01:34:35+00:00</published><updated>2009-05-19T01:34:35+00:00</updated><id>https://simonwillison.net/2009/May/19/twophased/#atom-tag</id><summary type="html">
    
&lt;p&gt;&lt;strong&gt;&lt;a href="http://www.holovaty.com/writing/django-two-phased-rendering/"&gt;Django tip: Caching and two-phased template rendering&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
Neat trick for expensive pages which can be mostly cached with the exception of the “logged in as” bit—run them through the template system twice, caching the intermediary generated template.


    &lt;p&gt;Tags: &lt;a href="https://simonwillison.net/tags/adrian-holovaty"&gt;adrian-holovaty&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/caching"&gt;caching&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/django"&gt;django&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/performance"&gt;performance&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/python"&gt;python&lt;/a&gt;, &lt;a href="https://simonwillison.net/tags/template"&gt;template&lt;/a&gt;&lt;/p&gt;



</summary><category term="adrian-holovaty"/><category term="caching"/><category term="django"/><category term="performance"/><category term="python"/><category term="template"/></entry></feed>