Increment the value of a key

    CLI Example:

    .. code-block:: bash

        salt '*' memcached.increment <key>
        salt '*' memcached.increment <key> 2
19670
def increment(key, delta=1, host=DEFAULT_HOST, port=DEFAULT_PORT):
    '''
    
    '''
    conn = _connect(host, port)
    _check_stats(conn)
    cur = get(key)

    if cur is None:
        raise CommandExecutionError('Key \'{0}\' does not exist'.format(key))
    elif not isinstance(cur, six.integer_types):
        raise CommandExecutionError(
            'Value for key \'{0}\' must be an integer to be '
            'incremented'.format(key)
        )

    try:
        return conn.incr(key, delta)
    except ValueError:
        raise SaltInvocationError('Delta value must be an integer')
1320223
public function increment($key, $val = 1)
    {
        return $this->hash($key)->incrBy($key, abs(intval($val)));
    }
340081
public function increment($key, $offset = 1, $initial = 0, $expiry = 0)
    {
        $operation = __FUNCTION__;
        $arguments = (new OperationArguments($operation))->setKey($key);
        if (func_num_args() > 1) {
            $arguments->setOffset($offset);
            if (func_num_args() > 2) {
                $arguments->setInitial($initial);
                if (func_num_args() > 3) {
                    $arguments->setExpiry($expiry);
                }
            }
        }
        return $this->doOperation($operation, $arguments);
    }
316957
def _dict_increment(self, dictionary, key):
        """"""
        if key in dictionary:
            dictionary[key] += 1
        else:
            dictionary[key] = 1
805196
def increment(self, key, value=1):
        
        raw = self._get_payload(key)

        integer = int(raw['data']) + value

        self.put(key, integer, int(raw['time']))

        return integer
772298
def decrement(self, key, value=1):
        
        return self._memcache.decr(self._prefix + key, value)
859285
def update(self, value):
        

        value = int(value)

        with self.lock:
            self.value += value
1193828
def increment(self):
    """"""
    self.value += self.increment_size
    return self.value - self.increment_size
1201617
def increment(self, member, amount=1):
        """"""
        self._dict[member] += amount
        return self._dict[member]
1211480
public function increment($key, $value = 1)
    {
        return $this->connection()->incrby($this->prefix.$key, $value);
    }
1146039
public function increment($key, $value = 1)
    {
        return $this->apc->increment($this->prefix.$key, $value);
    }
649229
def _add_to_cache(key, value):
    
    if key in _CACHE:
        _CACHE[key].append(value)
    else:
        _CACHE[key] = [_PATTERN, value]
        _CACHE_COUNTER[key] = 0
86353
public function increment($key, $offset=1) {
        $cacheKey = $this->buildKey($key);
        $ret = $this->getMemcache()->increment($cacheKey,$offset);
        if (!$ret) {
            $this->getMemcache()->set($cacheKey, 1);
            return 1;
        }
        return $ret;
    }
125929
public function increment($key, $value)
    {
        return $this->apcu ? apcu_inc($key, $value) : apc_inc($key, $value);
    }
1077982
def increment(self, member, amount=1):
        """"""
        return self.client.zincrby(self.name, member, amount)
913883
public static Single<Long> incrementByValue(String cacheKey, long value) {
        return incrementByValue(CacheService.CACHE_CONFIG_BEAN, cacheKey, value);
    }
637586
public function increment($key, $value = 1)
    {
        if (! isset($this->storage[$key])) {
            $this->forever($key, $value);

            return $this->storage[$key]['value'];
        }

        $this->storage[$key]['value'] = ((int) $this->storage[$key]['value']) + $value;

        return $this->storage[$key]['value'];
    }