From 65e37349d3ce19b6856e82c75a5b323da8ec40ea Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 6 Jul 2010 20:46:47 -0500 Subject: Enable template fragment caching on main page The left and right sidebars are the same for everyone, so cache both pieces as template fragments so we aren't constantly re-rendering them. Due to cookies being present in the 'Vary:' header, this at least allows some benefit of caching at a lower level than the middleware can handle. Signed-off-by: Dan McGee --- templates/public/index.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/templates/public/index.html b/templates/public/index.html index 19b43c66..d1b1dc2e 100644 --- a/templates/public/index.html +++ b/templates/public/index.html @@ -1,5 +1,6 @@ {% extends "base.html" %} {% load markup %} +{% load cache %} {% block head %} @@ -7,6 +8,7 @@ {% endblock %} {% block content_left %} +{% cache 300 main-page-left %}

A simple, lightweight distribution

@@ -49,9 +51,11 @@

+{% endcache %} {% endblock %} {% block content_right %} +{% cache 300 main-page-right %} +{% endcache %} {% endblock %} -- cgit v1.2.3-54-g00ecf