* $Author:: $ *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team *
* For more information visit: http://mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
// Increments a statistics entry
function incrementStatsEntry ($entry, $amount=1) {
// Do we have stats enabled?
- if (!ifInternalStatsEnabled()) {
+ if ((!ifInternalStatsEnabled()) && ($entry != 'db_hits')) {
+ // Abort here
return;
} // END - if
$GLOBALS['stats'][$entry] += $amount;
} else {
// Write it
- $GLOBALS['stats'][$entry] = $amount;
+ setStatsEntry($entry, $amount);
}
}
if ((isset($GLOBALS['stats'])) && (!isInstallationPhase()) && (ifInternalStatsEnabled())) {
// Write statistics to temporary table
writeStatsTable();
+
+ // Count db/cache hits in database
+ updateConfiguration(
+ array(
+ 'db_hits',
+ 'cache_hits'
+ ), array(
+ getStatsEntry('db_hits'),
+ getStatsEntry('cache_hits')
+ ),
+ '+'
+ );
} // END - if
}