From 1094c7983299907018a4a7ee455bf3a6ce743ece Mon Sep 17 00:00:00 2001 From: andi Date: Sun, 1 May 2005 19:48:43 +0200 Subject: added missing purgefile handling in xhtml caching darcs-hash:20050501174843-9977f-10aeb839e657f94ed9fead63db63a9b28137e3fc.gz --- inc/parserutils.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'inc/parserutils.php') diff --git a/inc/parserutils.php b/inc/parserutils.php index faeb620e7..c44351fed 100644 --- a/inc/parserutils.php +++ b/inc/parserutils.php @@ -67,6 +67,7 @@ function p_cached_xhtml($file){ global $conf; $cache = $conf['datadir'].'/_cache/xhtml/'; $cache .= md5($file.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT']); + $purge = $conf['datadir'].'/_cache/purgefile'; // check if cache can be used $cachetime = @filemtime($cache); // 0 if not exists @@ -75,6 +76,7 @@ function p_cached_xhtml($file){ && $cachetime > @filemtime($file) // cache is fresh && ((time() - $cachetime) < $conf['cachetime']) // and is cachefile young enough && !isset($_REQUEST['purge']) // no purge param was set + && ($cachetime > @filemtime($purge)) // and newer than the purgefile && ($cachetime > @filemtime(DOKU_INC.'conf/dokuwiki.php')) // newer than the config file && ($cachetime > @filemtime(DOKU_INC.'conf/local.php')) // newer than the local config file && ($cachetime > @filemtime(DOKU_INC.'inc/parser/xhtml.php')) // newer than the renderer -- cgit v1.2.3