From: Bernie Innocenti Date: Sun, 16 May 2010 13:25:53 +0000 (-0400) Subject: Prevent caching of content when wiki engine gets updated X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=bcff3d51e279853e511d71bc2459cfae50f34615;p=geekigeeki.git Prevent caching of content when wiki engine gets updated --- diff --git a/geekigeeki.py b/geekigeeki.py index 0427f9b..7880060 100755 --- a/geekigeeki.py +++ b/geekigeeki.py @@ -107,6 +107,8 @@ def url_args(kvargs): def emit_header(mtime=None, mime_type="text/html"): if mtime: + # Prevent caching when the wiki engine gets updated + mtime = max(mtime, os.stat(__file__).st_mtime) print("Last-Modified: " + strftime("%a, %d %b %Y %H:%M:%S GMT", gmtime(mtime))) if mime_type: print("Content-type: " + mime_type + "; charset=utf-8")