[CACHE] Readded

This commit is contained in:
Neozonz 2014-01-21 20:29:09 -05:00
parent a9853e2832
commit 0faf23027a
2 changed files with 4 additions and 3 deletions

View File

@ -13,9 +13,9 @@ $user_id = $api->checkAccess($user->checkApiKey($_REQUEST['api_key']), @$_REQUES
if ( ! $interval = $setting->getValue('statistics_ajax_data_interval')) $interval = 300;
// Output JSON format
$statistics->setGetCache(false);
$dPoolHashrate = $statistics->getCurrentHashrate($interval);
$statistics->setGetCache(true);
echo $api->get_json($dPoolHashrate);

View File

@ -14,8 +14,9 @@ $username = $user->getUsername($user_id);
if ( ! $interval = $setting->getValue('statistics_ajax_data_interval')) $interval = 300;
// Gather un-cached data
$statistics->setGetCache(false);
$hashrate = $statistics->getUserHashrate($username, $user_id, $interval);
$statistics->setGetCache(true);
// Output JSON
echo $api->get_json($hashrate);