<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -18,6 +18,17 @@ from django.conf import settings
 from django.core.paginator import QuerySetPaginator
 from lifeflow.models import Series, Flow, Entry, Comment
 from lifeflow.forms import CommentForm
+from django.core.cache import cache
+from django.http import HttpRequest
+from django.utils.cache import get_cache_key
+
+def expire_page(path):
+    'http://www.djangosnippets.org/snippets/936/'
+    request = HttpRequest()
+    request.path = path
+    key = get_cache_key(request)
+    if cache.has_key(key):
+        cache.delete(key)
 
 
 def server_error(request):
@@ -90,6 +101,7 @@ def comments(request, entry_id=None, parent_id=None):
                     webpage=webpage,body=body,html=html)
         c.save()
         url = u&quot;%s#comment_%s&quot; % (entry.get_absolute_url(), c.pk)
+        expire_page(entry.get_absolute_url())
         return HttpResponseRedirect(url)
 
     return render_to_response(</diff>
      <filename>views.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e1469f14568ef03838b87f33a99a7b097b382664</id>
    </parent>
  </parents>
  <author>
    <name>Will Larson</name>
    <email>lethain@gmail.com</email>
  </author>
  <url>http://github.com/lethain/lifeflow/commit/fde3db19a4cda38e4d73359aec8597687411e15a</url>
  <id>fde3db19a4cda38e4d73359aec8597687411e15a</id>
  <committed-date>2009-02-19T19:35:25-08:00</committed-date>
  <authored-date>2009-02-19T19:35:25-08:00</authored-date>
  <message>Added code to flush page's cache upon posting a comment.</message>
  <tree>48585d7b875274e70c09da2dac90364cc30377fc</tree>
  <committer>
    <name>Will Larson</name>
    <email>lethain@gmail.com</email>
  </committer>
</commit>
