当前位置: 首页>>代码示例>>PHP>>正文


PHP Repository::flush方法代码示例

本文整理汇总了PHP中Illuminate\Cache\Repository::flush方法的典型用法代码示例。如果您正苦于以下问题:PHP Repository::flush方法的具体用法?PHP Repository::flush怎么用?PHP Repository::flush使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Illuminate\Cache\Repository的用法示例。


在下文中一共展示了Repository::flush方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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'));
 }
开发者ID:ytake,项目名称:laravel-couchbase,代码行数:10,代码来源:MemcachedBucketTest.php

示例2: flush

 public function flush()
 {
     $this->cache->flush();
 }
开发者ID:sdebacker,项目名称:laravel-responsecache,代码行数:4,代码来源:ResponseCacheRepository.php

示例3: flush

 /**
  * Flushes traces of records related to the provided keywords, otherwise proceeds to regular flush() method.
  */
 public function flush()
 {
     if (!empty($this->keywords)) {
         $flushedKeys = $this->forgetKeywordIndex($this->keywords);
         $affectedKeywords = $this->forgetInverseIndex($flushedKeys);
         foreach ($flushedKeys as $flushedKey) {
             // Set all affected keywords as old keywords and request
             // empty new keywords to remove the flushed key from other indices as well.
             $this->determineKeywordsState($flushedKey, [], $affectedKeywords);
             $this->updateKeywordIndex($flushedKey);
             parent::forget($flushedKey);
         }
     } else {
         parent::flush();
     }
     if (!$this->operatingOnKeywords()) {
         $this->resetCurrentKeywords();
     }
 }
开发者ID:propaganistas,项目名称:laravel-cache-keywords,代码行数:22,代码来源:KeywordsRepository.php


注:本文中的Illuminate\Cache\Repository::flush方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。