public function increment($keyName = null, $value = null)
{
if ($keyName === null) {
$prefixedKey = $this->_lastKey;
} else {
$prefixedKey = $this->getPrefixedIdentifier($keyName);
}
if (!$prefixedKey) {
return false;
}
$this->_lastKey = $prefixedKey;
if (!$value) {
$value = 1;
}
$aKey = $this->buildKey($prefixedKey);
$this->db->increment($aKey, 'value', $value);
$status = $this->db->get($aKey, $cache);
if ($status != \Aerospike::OK) {
return false;
}
return $cache['bins']['value'];
}