From bcff3d51e279853e511d71bc2459cfae50f34615 Mon Sep 17 00:00:00 2001 From: Bernie Innocenti Date: Sun, 16 May 2010 09:25:53 -0400 Subject: [PATCH] Prevent caching of content when wiki engine gets updated --- geekigeeki.py | 2 ++ 1 file changed, 2 insertions(+) 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") -- 2.25.1