public function set($key, $val, array $opts = array())
{
if (!empty($opts['replace']) && isset($this->_noexist[$key])) {
return false;
}
/* @todo BC: 'timeout' == 'expire' usage. */
if (isset($opts['timeout']) && !isset($opts['expire'])) {
$opts['expire'] = $opts['timeout'];
}
if ($this->_set($this->hkey($key), $val, $opts)) {
unset($this->_noexist[$key]);
$res = true;
} else {
$res = false;
}
if (!empty($this->_params['logger'])) {
$this->_params['logger']->debug(sprintf('%s: Set key %s(%s)', get_class($this), $res ? '' : 'FAILED ', $key));
}
return $res;
}