Skip to content
Snippets Groups Projects
Commit 50602150 authored by Ben Coburn's avatar Ben Coburn
Browse files

init global memory cache arrays

Update to 'add function result caching for cleanID and wikiFN'.
Makes certain that arrays exist for the caches, without checking on each function call.
Properly create multidimensional arrays in wikiFN().

darcs-hash:20060828071205-05dcb-7c8dbdb5ea4e7b73808ec3bd9222df1b837d3a1f.gz
parent bb4e0b0b
No related branches found
No related tags found
No related merge requests found
......@@ -23,6 +23,10 @@
if (!defined('DOKU_E_LEVEL')) { error_reporting(E_ALL ^ E_NOTICE); }
else { error_reporting(DOKU_E_LEVEL); }
// init memory caches
$cache_wikifn = array();
$cache_cleanid = array();
//prepare config array()
global $conf;
if (!defined('DOKU_UNITTEST')) {
......
......@@ -188,6 +188,7 @@ function wikiFN($raw_id,$rev='',$clean=true){
}
}
if (!isset($cache[$raw_id])) { $cache[$raw_id] = array(); }
$cache[$raw_id][$rev] = $fn;
return $fn;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment