public function flushCommand(bool $force = false)
    {

        // Internal note: the $force option is evaluated early in the Flow
        // bootstrap in order to reliably flush the temporary data before any
        // other code can cause fatal errors.

        $this->cacheManager->flushCaches();

        $this->outputLine('Flushed all caches for "' . $this->bootstrap->getContext() . '" context.');
        if ($this->lockManager->isSiteLocked()) {
            $this->lockManager->unlockSite();
        }

        $frozenPackages = [];
        foreach (array_keys($this->packageManager->getAvailablePackages()) as $packageKey) {
            if ($this->packageManager->isPackageFrozen($packageKey)) {
                $frozenPackages[] = $packageKey;
            }
        }
        if ($frozenPackages !== []) {
            $this->outputFormatted(PHP_EOL . 'Please note that the following package' . (count($frozenPackages) === 1 ? ' is' : 's are') . ' currently frozen: ' . PHP_EOL);
            $this->outputFormatted(implode(PHP_EOL, $frozenPackages) . PHP_EOL, [], 2);

            $message = 'As code and configuration changes in these packages are not detected, the application may respond ';
            $message .= 'unexpectedly if modifications were done anyway or the remaining code relies on these changes.' . PHP_EOL . PHP_EOL;
            $message .= 'You may call <b>package:refreeze all</b> in order to refresh frozen packages or use the <b>--force</b> ';
            $message .= 'option of this <b>cache:flush</b> command to flush caches if Flow becomes unresponsive.' . PHP_EOL;
            $this->outputFormatted($message, [$frozenPackages]);
        }

        $this->sendAndExit(0);
    }
public function flushCommand(bool $force = false)
    {

        // Internal note: the $force option is evaluated early in the Flow
        // bootstrap in order to reliably flush the temporary data before any
        // other code can cause fatal errors.

        $this->cacheManager->flushCaches();

        $this->outputLine('Flushed all caches for "' . $this->bootstrap->getContext() . '" context.');
        if ($this->lockManager->isSiteLocked()) {
            $this->lockManager->unlockSite();
        }

        $frozenPackages = [];
        foreach (array_keys($this->packageManager->getAvailablePackages()) as $packageKey) {
            if ($this->packageManager->isPackageFrozen($packageKey)) {
                $frozenPackages[] = $packageKey;
            }
        }
        if ($frozenPackages !== []) {
            $this->outputFormatted(PHP_EOL . 'Please note that the following package' . (count($frozenPackages) === 1 ? ' is' : 's are') . ' currently frozen: ' . PHP_EOL);
            $this->outputFormatted(implode(PHP_EOL, $frozenPackages) . PHP_EOL, [], 2);

            $message = 'As code and configuration changes in these packages are not detected, the application may respond ';
            $message .= 'unexpectedly if modifications were done anyway or the remaining code relies on these changes.' . PHP_EOL . PHP_EOL;
            $message .= 'You may call <b>package:refreeze all</b> in order to refresh frozen packages or use the <b>--force</b> ';
            $message .= 'option of this <b>cache:flush</b> command to flush caches if Flow becomes unresponsive.' . PHP_EOL;
            $this->outputFormatted($message, [$frozenPackages]);
        }

        $this->sendAndExit(0);
    }
public function flushCommand ( bool $ force = false ) { // Internal note: the $force option is evaluated early in the Flow // bootstrap in order to reliably flush the temporary data before any // other code can cause fatal errors. $ this -> cacheManager -> flushCaches ( ) ; $ this -> outputLine ( 'Flushed all caches for "' . $ this -> bootstrap -> getContext ( ) . '" context.' ) ; if ( $ this -> lockManager -> isSiteLocked ( ) ) { $ this -> lockManager -> unlockSite ( ) ; } $ frozenPackages = [ ] ; foreach ( array_keys ( $ this -> packageManager -> getAvailablePackages ( ) ) as $ packageKey ) { if ( $ this -> packageManager -> isPackageFrozen ( $ packageKey ) ) { $ frozenPackages [ ] = $ packageKey ; } } if ( $ frozenPackages !== [ ] ) { $ this -> outputFormatted ( PHP_EOL . 'Please note that the following package' . ( count ( $ frozenPackages ) === 1 ? ' is' : 's are' ) . ' currently frozen: ' . PHP_EOL ) ; $ this -> outputFormatted ( implode ( PHP_EOL , $ frozenPackages ) . PHP_EOL , [ ] , 2 ) ; $ message = 'As code and configuration changes in these packages are not detected, the application may respond ' ; $ message .= 'unexpectedly if modifications were done anyway or the remaining code relies on these changes.' . PHP_EOL . PHP_EOL ; $ message .= 'You may call <b>package:refreeze all</b> in order to refresh frozen packages or use the <b>--force</b> ' ; $ message .= 'option of this <b>cache:flush</b> command to flush caches if Flow becomes unresponsive.' . PHP_EOL ; $ this -> outputFormatted ( $ message , [ $ frozenPackages ] ) ; } $ this -> sendAndExit ( 0 ) ; }
Flush all caches

The flush command flushes all caches (including code caches) which have been
registered with Flow's Cache Manager. It will NOT remove any session data, unless
you specifically configure the session caches to not be persistent.

If fatal errors caused by a package prevent the compile time bootstrap
from running, the removal of any temporary data can be forced by specifying
the option <b>--force</b>.

This command does not remove the precompiled data provided by frozen
packages unless the <b>--force</b> option is used.

@param boolean $force Force flushing of any temporary data
@return void
@see neos.flow:cache:warmup
@see neos.flow:package:freeze
@see neos.flow:package:refreeze
Flush all caches