diff options
author | chris <chris@jalakai.co.uk> | 2006-10-27 03:50:51 +0200 |
---|---|---|
committer | chris <chris@jalakai.co.uk> | 2006-10-27 03:50:51 +0200 |
commit | 8cfffb85a02a833726178d8ff5d4263348813b50 (patch) | |
tree | 38c65a70c8afea7f8515ec09bed5a14d91a5eaf4 | |
parent | 729c3d2ed88cf36d2ade93acc5695e81427b43c9 (diff) | |
download | rpg-8cfffb85a02a833726178d8ff5d4263348813b50.tar.gz rpg-8cfffb85a02a833726178d8ff5d4263348813b50.tar.bz2 |
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
-rw-r--r-- | inc/parserutils.php | 3 |
1 files changed, 2 insertions, 1 deletions
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); |