diff --git a/src/Core/Cache/MemcachedCacheDriver.php b/src/Core/Cache/MemcachedCacheDriver.php index d6b8d4ad5..78a4a6bdf 100644 --- a/src/Core/Cache/MemcachedCacheDriver.php +++ b/src/Core/Cache/MemcachedCacheDriver.php @@ -50,7 +50,7 @@ class MemcachedCacheDriver extends BaseObject implements ICacheDriver { // We store with the hostname as key to avoid problems with other applications return $this->memcached->set( - self::getApp()->get_hostname() . ":" . $key, + self::getApp()->get_hostname() . ':' . $key, $value, time() + $duration ); @@ -58,7 +58,9 @@ class MemcachedCacheDriver extends BaseObject implements ICacheDriver public function delete($key) { - return $this->memcached->delete($key); + $return = $this->memcached->delete(self::getApp()->get_hostname() . ':' . $key); + + return $return; } public function clear() diff --git a/src/Core/Session/CacheSessionHandler.php b/src/Core/Session/CacheSessionHandler.php index 463fd33d3..507735c4f 100644 --- a/src/Core/Session/CacheSessionHandler.php +++ b/src/Core/Session/CacheSessionHandler.php @@ -24,7 +24,7 @@ class CacheSessionHandler extends BaseObject implements SessionHandlerInterface public function read($session_id) { - if (!x($session_id)) { + if (empty($session_id)) { return ''; } @@ -58,9 +58,9 @@ class CacheSessionHandler extends BaseObject implements SessionHandlerInterface return true; } - Cache::set('session:' . $session_id, $session_data, Session::$expire); + $return = Cache::set('session:' . $session_id, $session_data, Session::$expire); - return true; + return $return; } public function close() @@ -70,8 +70,9 @@ class CacheSessionHandler extends BaseObject implements SessionHandlerInterface public function destroy($id) { - Cache::delete('session:' . $id); - return true; + $return = Cache::delete('session:' . $id); + + return $return; } public function gc($maxlifetime)