{"record":{"id":"a6dff34ea3a429f0","repo":"yiisoft/yii2","slug":"you-should-specify-cache-components-names","errorCode":null,"errorMessage":"You should specify cache components names","messagePattern":"You should specify cache components names","errorType":"console","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"framework/console/controllers/CacheController.php","lineNumber":83,"sourceCode":"        }\n    }\n\n    /**\n     * Flushes given cache components.\n     *\n     * For example,\n     *\n     * ```\n     * # flushes caches specified by their id: \"first\", \"second\", \"third\"\n     * yii cache/flush first second third\n     * ```\n     */\n    public function actionFlush()\n    {\n        $cachesInput = func_get_args();\n\n        if (empty($cachesInput)) {\n            throw new Exception('You should specify cache components names');\n        }\n\n        $caches = $this->findCaches($cachesInput);\n        $cachesInfo = [];\n\n        $foundCaches = array_keys($caches);\n        $notFoundCaches = array_diff($cachesInput, array_keys($caches));\n\n        if ($notFoundCaches !== []) {\n            $this->notifyNotFoundCaches($notFoundCaches);\n        }\n\n        if ($foundCaches === []) {\n            $this->notifyNoCachesFound();\n            return ExitCode::OK;\n        }\n\n        if (!$this->confirmFlush($foundCaches)) {","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/yiisoft/yii2/blob/66f00d18a29b520f85e8e8f1e32d1e7e7b556cac/framework/console/controllers/CacheController.php#L65-L101","documentation":"Error \"You should specify cache components names\" thrown in yiisoft/yii2.","triggerScenarios":"Thrown at framework/console/controllers/CacheController.php:83 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"66f00d18a29b520f85e8e8f1e32d1e7e7b556cac","analyzedAt":"2026-08-17T05:17:23.470Z","schemaVersion":2},"datasetVersion":"2026-08-17T09:17:11.063Z"}