本文整理匯總了PHP中Illuminate\Cache\Repository::increment方法的典型用法代碼示例。如果您正苦於以下問題:PHP Repository::increment方法的具體用法?PHP Repository::increment怎麽用?PHP Repository::increment使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Illuminate\Cache\Repository
的用法示例。
在下文中一共展示了Repository::increment方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testShouldReturnNullFlushRecord
public function testShouldReturnNullFlushRecord()
{
$this->repository->add('memcached-testing', 'couchbase', 60);
$this->repository->decrement('memcached-testing-decrement', 100);
$this->repository->increment('memcached-testing-increment', 100);
$this->repository->flush();
$this->assertNull($this->repository->get('memcached-testing'));
$this->assertNull($this->repository->get('memcached-testing-decrement'));
$this->assertNull($this->repository->get('memcached-testing-increment'));
}
示例2: increment
/**
* Increment the value of an item in the cache.
*
* @param string $key
* @param mixed $value
*
* @return int|bool
* @static
*/
public static function increment($key, $value = 1)
{
return \Illuminate\Cache\Repository::increment($key, $value);
}