From 4ec364f03629461dd6df3861f498e74ba84691e8 Mon Sep 17 00:00:00 2001 From: Frederick Behrends Date: Fri, 20 Dec 2013 03:38:53 +0100 Subject: [PATCH] [FIX] enable Caching for ExpectedNextDifficulty and NetworkExpectedTimePerBlock --- public/include/classes/statistics.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/include/classes/statistics.class.php b/public/include/classes/statistics.class.php index 601b5863..29b97ca6 100644 --- a/public/include/classes/statistics.class.php +++ b/public/include/classes/statistics.class.php @@ -816,7 +816,7 @@ class Statistics extends Base { $dDifficulty = 1; } - return pow(2, 32) * $dDifficulty / $dNetworkHashrate; + return $this->memcache->setCache(__FUNCTION__, pow(2, 32) * $dDifficulty / $dNetworkHashrate); } /** @@ -832,7 +832,7 @@ class Statistics extends Base { $dDifficulty = 1; } - return round($dDifficulty * $this->config['cointarget'] / $this->getNetworkExpectedTimePerBlock(), 8); + return $this->memcache->setCache(__FUNCTION__, round($dDifficulty * $this->config['cointarget'] / $this->getNetworkExpectedTimePerBlock(), 8)); } /**