From 0faf23027a2a4e8292ef3a46e308c3a80b15369b Mon Sep 17 00:00:00 2001 From: Neozonz Date: Tue, 21 Jan 2014 20:29:09 -0500 Subject: [PATCH] [CACHE] Readded --- public/include/pages/api/getpoolhashrate.inc.php | 4 ++-- public/include/pages/api/getuserhashrate.inc.php | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/public/include/pages/api/getpoolhashrate.inc.php b/public/include/pages/api/getpoolhashrate.inc.php index 6454b809..a5985d44 100644 --- a/public/include/pages/api/getpoolhashrate.inc.php +++ b/public/include/pages/api/getpoolhashrate.inc.php @@ -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); diff --git a/public/include/pages/api/getuserhashrate.inc.php b/public/include/pages/api/getuserhashrate.inc.php index 03603c24..1b1d5250 100644 --- a/public/include/pages/api/getuserhashrate.inc.php +++ b/public/include/pages/api/getuserhashrate.inc.php @@ -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);