Previous Page
getLife()

Solar_Cache_Adapter_File
increment()

Next Page
isActive()

increment()

public int increment ( string $key, string $amt default 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.