Lavender\Cloud\Sina\Cache\KvdbStore::incrementOrDecrement PHP Method

incrementOrDecrement() private method

Increment or Decrement the value of an item in the cache.
private incrementOrDecrement ( string $key, mixed $value, string $direction = '+' ) : integer
$key string
$value mixed
$direction string
return integer
    private function incrementOrDecrement($key, $value, $direction = '+')
    {
        $target = $this->kvdb->get($this->prefix . $key);
        $direction == '-' ? $target -= $value : ($target += $value);
        $this->kvdb->set($this->prefix . $key, $target);
        return $target;
    }