From 8cfffb85a02a833726178d8ff5d4263348813b50 Mon Sep 17 00:00:00 2001 From: chris Date: Fri, 27 Oct 2006 03:50:51 +0200 Subject: code highlighting fragment cache update expire the cache if GeSHi (inc/geshi.php) has been updated since cache creation darcs-hash:20061027015051-9b6ab-f633dc5130ff23f0eb8871e4f8afb563fff3dc5b.gz --- inc/parserutils.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/parserutils.php b/inc/parserutils.php index 468ffe5c6..061704cb3 100644 --- a/inc/parserutils.php +++ b/inc/parserutils.php @@ -492,7 +492,8 @@ function p_get_first_heading($id){ function p_xhtml_cached_geshi($code, $language) { $cache = getCacheName($language.$code,".code"); - if (@file_exists($cache) && !$_REQUEST['purge']) { + if (@file_exists($cache) && !$_REQUEST['purge'] && + (filemtime($cache) > filemtime(DOKU_INC . 'inc/geshi.php'))) { $highlighted_code = io_readFile($cache, false); @touch($cache); -- cgit v1.2.3