yii\console\controllers\CacheController::actionFlushAll PHP Method

actionFlushAll() public method

Flushes all caches registered in the system.
public actionFlushAll ( )
    public function actionFlushAll()
    {
        $caches = $this->findCaches();
        $cachesInfo = [];
        if (empty($caches)) {
            $this->notifyNoCachesFound();
            return static::EXIT_CODE_NORMAL;
        }
        foreach ($caches as $name => $class) {
            $cachesInfo[] = ['name' => $name, 'class' => $class, 'is_flushed' => Yii::$app->get($name)->flush()];
        }
        $this->notifyFlushed($cachesInfo);
    }