public function showCommand(string $cacheIdentifier)
    {
        try {
            $cache = $this->cacheManager->getCache($cacheIdentifier);
        } catch (NoSuchCacheException $exception) {
            $this->outputLine('<error>A Cache with id "%s" is not configured.</error>', [$cacheIdentifier]);
            $this->outputLine('Use the <i>neos.flow:cache:list</i> command to get a list of all configured Caches.');
            $this->quit(1);
            return;
        }
        $cacheConfigurations = $this->cacheManager->getCacheConfigurations();
        $defaultConfiguration = $cacheConfigurations['Default'];
        $cacheConfiguration = $cacheConfigurations[$cache->getIdentifier()];
        $cacheBackend = $cache->getBackend();
        $this->outputLine('<b>Identifier</b>: %s', [$cache->getIdentifier()]);
        $this->outputLine('<b>Frontend</b>: %s', [TypeHandling::getTypeForValue($cache)]);
        $this->outputLine('<b>Backend</b>: %s', [TypeHandling::getTypeForValue($cacheBackend)]);
        $options = $cacheConfiguration['backendOptions'] ?? $defaultConfiguration['backendOptions'];
        $this->outputLine('<b>Backend Options</b>:');
        $this->outputLine(json_encode($options, JSON_PRETTY_PRINT));

        if ($cacheBackend instanceof WithStatusInterface) {
            $this->outputLine();
            $this->outputLine('<b>Status:</b>');
            $this->outputLine('=======');
            $cacheStatus = $cacheBackend->getStatus();
            $this->renderResult($cacheStatus);

            if ($cacheStatus->hasErrors() || $cacheStatus->hasWarnings()) {
                $this->quit(1);
                return;
            }
        }
    }
public function showCommand(string $cacheIdentifier)
    {
        try {
            $cache = $this->cacheManager->getCache($cacheIdentifier);
        } catch (NoSuchCacheException $exception) {
            $this->outputLine('<error>A Cache with id "%s" is not configured.</error>', [$cacheIdentifier]);
            $this->outputLine('Use the <i>neos.flow:cache:list</i> command to get a list of all configured Caches.');
            $this->quit(1);
            return;
        }
        $cacheConfigurations = $this->cacheManager->getCacheConfigurations();
        $defaultConfiguration = $cacheConfigurations['Default'];
        $cacheConfiguration = $cacheConfigurations[$cache->getIdentifier()];
        $cacheBackend = $cache->getBackend();
        $this->outputLine('<b>Identifier</b>: %s', [$cache->getIdentifier()]);
        $this->outputLine('<b>Frontend</b>: %s', [TypeHandling::getTypeForValue($cache)]);
        $this->outputLine('<b>Backend</b>: %s', [TypeHandling::getTypeForValue($cacheBackend)]);
        $options = $cacheConfiguration['backendOptions'] ?? $defaultConfiguration['backendOptions'];
        $this->outputLine('<b>Backend Options</b>:');
        $this->outputLine(json_encode($options, JSON_PRETTY_PRINT));

        if ($cacheBackend instanceof WithStatusInterface) {
            $this->outputLine();
            $this->outputLine('<b>Status:</b>');
            $this->outputLine('=======');
            $cacheStatus = $cacheBackend->getStatus();
            $this->renderResult($cacheStatus);

            if ($cacheStatus->hasErrors() || $cacheStatus->hasWarnings()) {
                $this->quit(1);
                return;
            }
        }
    }
public function showCommand ( string $ cacheIdentifier ) { try { $ cache = $ this -> cacheManager -> getCache ( $ cacheIdentifier ) ; } catch ( NoSuchCacheException $ exception ) { $ this -> outputLine ( '<error>A Cache with id "%s" is not configured.</error>' , [ $ cacheIdentifier ] ) ; $ this -> outputLine ( 'Use the <i>neos.flow:cache:list</i> command to get a list of all configured Caches.' ) ; $ this -> quit ( 1 ) ; return ; } $ cacheConfigurations = $ this -> cacheManager -> getCacheConfigurations ( ) ; $ defaultConfiguration = $ cacheConfigurations [ 'Default' ] ; $ cacheConfiguration = $ cacheConfigurations [ $ cache -> getIdentifier ( ) ] ; $ cacheBackend = $ cache -> getBackend ( ) ; $ this -> outputLine ( '<b>Identifier</b>: %s' , [ $ cache -> getIdentifier ( ) ] ) ; $ this -> outputLine ( '<b>Frontend</b>: %s' , [ TypeHandling :: getTypeForValue ( $ cache ) ] ) ; $ this -> outputLine ( '<b>Backend</b>: %s' , [ TypeHandling :: getTypeForValue ( $ cacheBackend ) ] ) ; $ options = $ cacheConfiguration [ 'backendOptions' ] ?? $ defaultConfiguration [ 'backendOptions' ] ; $ this -> outputLine ( '<b>Backend Options</b>:' ) ; $ this -> outputLine ( json_encode ( $ options , JSON_PRETTY_PRINT ) ) ; if ( $ cacheBackend instanceof WithStatusInterface ) { $ this -> outputLine ( ) ; $ this -> outputLine ( '<b>Status:</b>' ) ; $ this -> outputLine ( '=======' ) ; $ cacheStatus = $ cacheBackend -> getStatus ( ) ; $ this -> renderResult ( $ cacheStatus ) ; if ( $ cacheStatus -> hasErrors ( ) || $ cacheStatus -> hasWarnings ( ) ) { $ this -> quit ( 1 ) ; return ; } } }
Display details of a cache including a detailed status if available

@param string $cacheIdentifier identifier of the cache (for example "Flow_Core")
@return void
@see neos.flow:cache:list
@throws StopActionException
Display details of a cache including a detailed status if available