本文整理汇总了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);
}