From a586cc36abcee8157930204df46a986f5ece93a2 Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Fri, 24 Jan 2014 12:32:21 +0100 Subject: [PATCH] [FIX] Honor cache flag for getUserSharerate --- public/include/classes/statistics.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/include/classes/statistics.class.php b/public/include/classes/statistics.class.php index 294a6bf1..c61aeb23 100644 --- a/public/include/classes/statistics.class.php +++ b/public/include/classes/statistics.class.php @@ -590,7 +590,7 @@ class Statistics extends Base { public function getUserSharerate($username, $account_id=NULL, $interval=180) { $this->debug->append("STA " . __METHOD__, 4); // Dual-caching, try statistics cron first, then fallback to local, then fallbock to SQL - if ($data = $this->memcache->getStatic(STATISTICS_ALL_USER_HASHRATES)) { + if ($this->getGetCache() && $data = $this->memcache->getStatic(STATISTICS_ALL_USER_HASHRATES)) { if (array_key_exists($account_id, $data['data'])) return $data['data'][$account_id]['sharerate']; // We have no cached value, we return defaults