aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--html/index.php4
-rw-r--r--lib.php3
2 files changed, 7 insertions, 0 deletions
diff --git a/html/index.php b/html/index.php
index dcdbb35..2de3938 100644
--- a/html/index.php
+++ b/html/index.php
@@ -2,6 +2,8 @@
/**
*/
+$t0 = microtime();
+
/** Below variables are defined after the document variables. */
/** URL of the document calling the service. */
@@ -32,3 +34,5 @@ header('Content-Type: text/html;charset=utf-8');
header(sprintf('Expires: %s', gmdate('r', strtotime('+1 day'))));
echo _mgnav_html($wrap, $lang, null, 'www.mageia.org', NCache::build('var/tmp/cache'));
+
+apache_note('navMakeTime', number_format(microtime() - $t0, 6)); \ No newline at end of file
diff --git a/lib.php b/lib.php
index 0cc8db9..f524c45 100644
--- a/lib.php
+++ b/lib.php
@@ -199,9 +199,12 @@ function _mgnav_html($wrap = false, $lang = 'en', $inject = null, $vhost = 'www.
$key = array($wrap, $lang, $inject, $vhost);
if (!is_null($cache) && ($h = $cache->get($key))) {
+ apache_note('navCacheHit', 1);
return $h;
}
+ apache_note('navCacheHit', 0);
+
$lang = _lang_check($lang);
l10n::load($lang, $cache);