Solar_Cache_Adapter::increment()

public int Solar_Cache_Adapter::increment ( string $key , string $amt = 1 )

Increments a cache entry value by the specified amount.

Parameters

  • (string) $key: The entry ID.

  • (string) $amt: The amount to increment by (default +1). Using negative values is effectively a decrement.

Returns

  • (int) The new value of the cache entry.

Description

Increments a cache entry value by the specified amount.

If the entry does not exist, creates it at zero, then increments it.



Local