flushByTag() публичный Метод

Removes all cache entries of this cache which are tagged by the specified tag.
public flushByTag ( string $tag ) : integer
$tag string The tag the entries must have
Результат integer The number of entries which have been affected by this flush
 /**
  * @test
  */
 public function flushByTagRemovesEntries()
 {
     $this->backend->set('some_entry', 'foo', ['tag1', 'tag2']);
     $this->backend->flushByTag('tag1');
     $entryIdentifiers = [];
     foreach ($this->backend as $entryIdentifier => $entryValue) {
         $entryIdentifiers[] = $entryIdentifier;
     }
     $this->assertEquals([], $entryIdentifiers);
 }