public function incrementItem($cache, $key, $amount = 1)
    {
        $cache = self::encodeCache($cache);
        $key = self::encodeKey($key);
        $url = "projects/{$this->project_id}/caches/$cache/items/$key/increment";
        $params = array(
            'amount' => $amount,
        );
        $this->setJsonHeaders();
        return self::json_decode($this->apiCall(self::POST, $url, $params));
    }
public function incrementItem($cache, $key, $amount = 1)
    {
        $cache = self::encodeCache($cache);
        $key = self::encodeKey($key);
        $url = "projects/{$this->project_id}/caches/$cache/items/$key/increment";
        $params = array(
            'amount' => $amount,
        );
        $this->setJsonHeaders();
        return self::json_decode($this->apiCall(self::POST, $url, $params));
    }
public function incrementItem ( $ cache , $ key , $ amount = 1 ) { $ cache = self :: encodeCache ( $ cache ) ; $ key = self :: encodeKey ( $ key ) ; $ url = "projects/{$this->project_id}/caches/$cache/items/$key/increment" ; $ params = array ( 'amount' => $ amount , ) ; $ this -> setJsonHeaders ( ) ; return self :: json_decode ( $ this -> apiCall ( self :: POST , $ url , $ params ) ) ; }
Atomically increments the value for key by amount.
Can be used for both increment and decrement by passing a negative value.
The value must exist and must be an integer.
The number is treated as an unsigned 64-bit integer.
The usual overflow rules apply when adding, but subtracting from 0 always yields 0.

@param string $cache
@param string $key
@param int $amount Change by this value
@return mixed|void
Atomically increments the value for key by amount . Can be used for both increment and decrement by passing a negative value . The value must exist and must be an integer . The number is treated as an unsigned 64 - bit integer . The usual overflow rules apply when adding but subtracting from 0 always yields 0 .