public function flushTagsCommand(array $tags, array $groups = null)
    {
        try {
            $this->cacheService->flushByTagsAndGroups($tags, $groups);
            if ($groups === null) {
                $this->outputLine('Flushed caches by tags "' . implode('","', $tags) . '".');
            } else {
                $this->outputLine('Flushed caches by tags "' . implode('","', $tags) . '" in groups: "' . implode('","', $groups) . '".');
            }
        } catch (NoSuchCacheGroupException $e) {
            $this->outputLine($e->getMessage());
            $this->quit(1);
        }
    }
public function flushTagsCommand(array $tags, array $groups = null)
    {
        try {
            $this->cacheService->flushByTagsAndGroups($tags, $groups);
            if ($groups === null) {
                $this->outputLine('Flushed caches by tags "' . implode('","', $tags) . '".');
            } else {
                $this->outputLine('Flushed caches by tags "' . implode('","', $tags) . '" in groups: "' . implode('","', $groups) . '".');
            }
        } catch (NoSuchCacheGroupException $e) {
            $this->outputLine($e->getMessage());
            $this->quit(1);
        }
    }
public function flushTagsCommand ( array $ tags , array $ groups = null ) { try { $ this -> cacheService -> flushByTagsAndGroups ( $ tags , $ groups ) ; if ( $ groups === null ) { $ this -> outputLine ( 'Flushed caches by tags "' . implode ( '","' , $ tags ) . '".' ) ; } else { $ this -> outputLine ( 'Flushed caches by tags "' . implode ( '","' , $ tags ) . '" in groups: "' . implode ( '","' , $ groups ) . '".' ) ; } } catch ( NoSuchCacheGroupException $ e ) { $ this -> outputLine ( $ e -> getMessage ( ) ) ; $ this -> quit ( 1 ) ; } }
Flush cache by tags

Flushes caches by tags, optionally only caches in specified groups.

<b>Example:</b> <code>%command.full_name% news_123 --groups pages,all</code>

@param array $tags Array of tags (specified as comma separated values) to flush.
@param array $groups Optional array of groups (specified as comma separated values) for which to flush tags. If no group is specified, caches of all groups are flushed.
Flush cache by tags