Increment the counter for a given key for a given decay time.

@param  string  $key
@param  int  $decaySeconds
@return int
343768
public function hit($key, $decaySeconds = 60)
    {
        $this->cache->add(
            $key.':timer', $this->availableAt($decaySeconds), $decaySeconds
        );

        $added = $this->cache->add($key, 0, $decaySeconds);

        $hits = (int) $this->cache->increment($key);

        if (! $added && $hits == 1) {
            $this->cache->put($key, 1, $decaySeconds);
        }

        return $hits;
    }
7985
public function increment($key, $step = 1)
    {
        $success = false;

        return wincache_ucache_inc($this->prefixKey . $key, $step, $success);
    }
685828
public function getExpiry($key)
    {
        $key = $this->getPrefix().$key;
        if (!$this->isInCache($key)) {
            return false;
        }

        return $this->fetchExpirationFromCache($key);
    }
1233700
public function decrement($key, $offset=1) {
        return $this->getMemcache()->decrement($this->buildKey($key), $offset);
    }
1159954
public function decrement($key, $steps = 1)
    {
        $key = "integer-store::$key";

        if (!isset($this->cache[$key])) {
            $this->cache[$key] = 0;
        }

        $this->cache[$key] -= $steps;

        return $this->cache[$key];
    }
296336
public function setCache($key, $data, $lifetimeInSeconds = false)
    {
        if ($this->sqlInitialized()) {
            if ($this->sql) {
                /* escape query data */
                $_key = $this->sql->real_escape_string($key);
                $_data = $this->sql->real_escape_string(serialize($data));
                $_expire = $this->getExpirationTimestamp($lifetimeInSeconds);

                $response = $this->sql->query("
                    SELECT *
                        FROM `{$this->table}`
                        WHERE
                            `{$this->key}` = '$_key'
                ");
                if ($response->fetch_assoc()) {
                    if ($this->sql->query("
                        UPDATE
                            `{$this->table}`
                            SET
                                `{$this->cache}` = '$_data',
                                `expire` = " . ($_expire === false ? 'NULL' : "'$_expire'") . "
                            WHERE
                                `{$this->key}` = '$_key'
                    ")) {
                        return true;
                    } else {
                        throw new SimpleCache_Exception(
                            'Could not update existing cache data. ' . $this->sql->error,
                            SimpleCache_Exception::CACHE_WRITE
                        );
                    }
                } elseif ($this->sql->query("
                    INSERT
                        INTO `{$this->table}`
                        (
                            `{$this->key}`,
                            `{$this->cache}`
                            " . ($_expire === false ? '' : ", `expire`") . "
                        ) VALUES (
                            '$_key',
                            '$_data'
                            " . ($_expire === false ? '' : ", '$_expire'") . "
                        )
                ")) {
                    return true;
                } else {
                    throw new SimpleCache_Exception(
                        'Could not insert new cache data. ' . $this->sql->error,
                        SimpleCache_Exception::CACHE_WRITE
                    );
                }
            }
            return false;
        }
    }
440919
public function increment($key, $value = 1)
    {
        $data   = $this->getData($key);
        $result = intval($data['data']) + $value;
        $this->set($key, $result, $data['time']);

        return $result;
    }
244656
public function increment($key, $value = 1)
    {
        $raw = $this->getPayload($key);

        return tap(
            ((int) $raw['data']) + $value, function ($newValue) use ($key, $raw) {
                $this->put($key, $newValue, $raw['time']);
            }
        );
    }
457623
public function increment($key)
    {
        $key = (string)$key;
        if ($cache = $this->loadCache()) {
            if (isset($cache[$key])) {
                $tmp = unserialize($cache[$key]['data']);
                if (is_numeric($tmp)) {
                    ++$tmp;
                    $cache[$key]['data'] = serialize($tmp);
                    $this->saveCache($cache);
                    return $this;
                }
            }
        }
        throw new RunBBException("Error: increment() - Key '{$key}' not found.");
    }
173339
public function tooManyAttempts( $key, $maxAttempts, $decayMinutes = 1 )
	{
		if ( $this->cache->has( $key . ':lockout' ) )
			return true;

		if ( $this->attempts( $key ) > $maxAttempts )
		{
			$this->cache->add( $key . ':lockout', time() + ( $decayMinutes * 60 ), $decayMinutes );

			$this->resetAttempts( $key );

			return true;
		}

		return false;
	}
565875
public function decrement($key, $step = 1)
    {
        if (!$this->enabled)
            return false;

        $has_replaced = $has_set = false;
        try {
            // Store the cache object
            $nKey = $this->key($key);
            $has_set = @$this->getConnection()->decrement($nKey, $step);

        } catch (Exception $e) {
            throw new CacheException($e->getMessage(), $e->getCode());
        }

        $this->Logger->debug("". (($has_replaced || $has_set) ? "Successfully" : "Failed to") . " decrement key '{$key}'\n");
//        $this->Logger->debug($data);

        return $has_set;

    }
986466
public function increment($key, $step = 1)
    {
        $connection = $this->getConnection($key);
        $this->writeToRemote(array(
            'cmd' => 'increment',
            'key' => $key,
            'step' => $step,
        ), $connection);
        return $this->readFromRemote($connection);
    }
17905
public function decrement($key, $steps = 1)
    {
        $previous = $this->has($key) ? $this->get($key) : 0;
        $previous -= $steps;
        $this->put($key, $previous);

        return $previous;
    }
224669
public function increment($key, $offset=1, $initial_value=0, $expiry=0) {
		return $this->cache->increment($this->prefix.$key, $offset, $initial_value, $expiry);
	}
1247456
public function tooManyAttempts($key, $maxAttempts, $decayMinutes = 1)
    {
        if ($this->cache->has($key.':lockout')) {
            return true;
        }

        if ($this->attempts($key) >= $maxAttempts) {
            $this->lockout($key, $decayMinutes);

            $this->resetAttempts($key);

            return true;
        }

        return false;
    }
270168
public function expire($key, $seconds)
    {
        try {
            $value = $this->get($key);
        } catch (KeyNotFoundException $e) {
            return false;
        }

        return $this->getClient()->replace(
            $key,
            Util::getDataWithExpire($value, $seconds, time()),
            $seconds
        );
    }
575899
public function increment($key, $steps = 1)
    {
        $key = "integer-store::$key";

        if (!isset($this->cache[$key])) {
            $this->cache[$key] = 0;
        }

        $this->cache[$key] += $steps;

        return $this->cache[$key];
    }