/** * Refresh cache * @return type */ public function actionRefresh() { $model = new Route(); $model->invalidate(); Yii::$app->getResponse()->format = 'json'; return $model->getRoutes(); }