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'));
 }
 public function flush()
 {
     $this->cache->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();
     }
 }