[FIX] Live stats not being done with global cache
Fixes live stats not updating and always using the global cache instead.
This commit is contained in:
parent
4d07efe61c
commit
971006b7a2
@ -501,7 +501,7 @@ class Statistics extends Base {
|
||||
public function getUserHashrate($account_id, $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]['hashrate'];
|
||||
// We have no cached value, we return defaults
|
||||
@ -563,7 +563,7 @@ class Statistics extends Base {
|
||||
public function getUserShareDifficulty($account_id, $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]['avgsharediff'];
|
||||
// We have no cached value, we return defaults
|
||||
|
||||
Loading…
Reference in New Issue
Block a user