public function save($key, $value, $ttl = 259200, $tags = NULL)
{
$key = (string) $key;
$ttl = $this->ttl_to_expiration($ttl);
try {
if (false === $this->Couchbase->set($this->prefix . $key, $value, $ttl)) {
$reason = $this->prefix . $key;
if (strlen($key) > 250) {
$reason = 'key length should be <250';
}
$this->ReportError('Couchbase can not store key: ' . $reason, __LINE__);
return false;
}
$this->setKeyTTL($key, $ttl);
if (!empty($tags)) {
$this->setTags($key, $tags);
}
return true;
} catch (\Exception $Exception) {
return false;
}
}