public function update($key, $value, $ttl = 0, $condition = array())
{
$extra = array('prevExist' => 'true');
if ($condition) {
$extra = array_merge($extra, $condition);
}
$body = $this->set($key, $value, $ttl, $extra);
if (isset($body['errorCode'])) {
throw new KeyNotFoundException($body['message'], $body['errorCode']);
}
return $body;
}