From 0d367697e0a72aef0d879bd7f6bbc6618afb3ff1 Mon Sep 17 00:00:00 2001 From: Sebastian Grewe Date: Tue, 21 Jan 2014 15:24:44 +0100 Subject: [PATCH] [FIX] Storing/showing wrong data from cache Fixes #1517 --- public/include/classes/statscache.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/public/include/classes/statscache.class.php b/public/include/classes/statscache.class.php index e6bd84c4..54e47d6f 100644 --- a/public/include/classes/statscache.class.php +++ b/public/include/classes/statscache.class.php @@ -53,7 +53,9 @@ class StatsCache { 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); - return $this->cache->set($this->config['memcache']['keyprefix'] . $key, $value, $expiration); + if ($this->cache->set($this->config['memcache']['keyprefix'] . $key, $value, $expiration)) + return $value; + return false; } /**