/** * @param string $cache Which cache to flush * * @return bool * @throws DreamFactory\Platform\Exceptions\BadRequestException */ public function actionFlush($cache) { $this->layout = false; switch (strtolower($cache)) { case 'platform': Platform::storeDeleteAll(); Pii::flushConfig(); break; case 'swagger': SwaggerManager::clearCache(); break; default: throw new BadRequestException(); } echo json_encode(array('success' => true, 'cache' => $cache)); return Pii::end(); }