summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandi <andi@splitbrain.org>2005-05-01 19:48:43 +0200
committerandi <andi@splitbrain.org>2005-05-01 19:48:43 +0200
commit1094c7983299907018a4a7ee455bf3a6ce743ece (patch)
treefd08d0d1978d8b4fc9f8e98022096e2a48976359
parent7879fd27774b370f11edb45c1aaa61e2af652241 (diff)
downloadrpg-1094c7983299907018a4a7ee455bf3a6ce743ece.tar.gz
rpg-1094c7983299907018a4a7ee455bf3a6ce743ece.tar.bz2
added missing purgefile handling in xhtml caching
darcs-hash:20050501174843-9977f-10aeb839e657f94ed9fead63db63a9b28137e3fc.gz
-rw-r--r--inc/parserutils.php2
1 files changed, 2 insertions, 0 deletions
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