diff --git a/public/include/classes/statscache.class.php b/public/include/classes/statscache.class.php index 54e47d6f..bdcbbabd 100644 --- a/public/include/classes/statscache.class.php +++ b/public/include/classes/statscache.class.php @@ -37,7 +37,7 @@ class StatsCache { * Do not store values if memcache is disabled **/ public function set($key, $value, $expiration=NULL) { - if (! $this->config['memcache']['enabled']) return false; + if (! $this->config['memcache']['enabled']) return $value; if (empty($expiration)) $expiration = $this->config['memcache']['expiration'] + rand( -$this->config['memcache']['splay'], $this->config['memcache']['splay']); $this->debug->append("Storing " . $this->getRound() . '_' . $this->config['memcache']['keyprefix'] . "$key with expiration $expiration", 3); @@ -49,7 +49,7 @@ class StatsCache { * Can be used as a static, auto-updated cache via crons **/ public function setStaticCache($key, $value, $expiration=NULL) { - if (! $this->config['memcache']['enabled']) return false; + if (! $this->config['memcache']['enabled']) return $value; if (empty($expiration)) $expiration = $this->config['memcache']['expiration'] + rand( -$this->config['memcache']['splay'], $this->config['memcache']['splay']); $this->debug->append("Storing " . $this->config['memcache']['keyprefix'] . "$key with expiration $expiration", 3);