/** * get * * get a value from the memcache. * * @author eloy * @access public * * @param string $key Key to get value * * @return mixed */ public function get($key) { $value = null; try { $value = parent::get($key, self::FLAGS); } catch (Exception $e) { $value = null; wfDebugLog("memcachepool", "Error when getting value from key {$key}", true); } if ($this->_debug) { wfDebug(__METHOD__ . ": {$key} value is " . (is_null($value) ? "null" : "not null") . "\n"); } return $value; }
public function get($key, &$flags = null, &$cas = null) { if ($this->logging) { $start = microtime(true); $name = 'get'; $arguments = array($key, $flags, $cas); } list($_key, $_flags, $_cas) = array($key, $flags, $cas); $result = parent::get($_key, $_flags, $_cas); list($key, $flags, $cas) = array($_key, $_flags, $_cas); if ($this->logging) { $time = microtime(true) - $start; $this->calls[] = (object) compact('start', 'time', 'name', 'arguments', 'result'); } return $result; }