diff --git a/app/admin/controller/Auth.php b/app/admin/controller/Auth.php index 5553814e9..2af89e42d 100644 --- a/app/admin/controller/Auth.php +++ b/app/admin/controller/Auth.php @@ -94,7 +94,7 @@ class Auth extends Controller { $map = $this->_vali(['auth.require#id' => '权限ID不能为空!']); if (input('action') === 'get') { - if ($this->app->isDebug()) AdminService::clearCache(); + if ($this->app->isDebug()) AdminService::clear(); $nodes = SystemNode::mk()->where($map)->column('node'); $this->success('获取权限节点成功!', AdminService::getTree($nodes)); } elseif (input('action') === 'save') { diff --git a/app/admin/controller/Menu.php b/app/admin/controller/Menu.php index 12e569f07..c3a692179 100644 --- a/app/admin/controller/Menu.php +++ b/app/admin/controller/Menu.php @@ -99,14 +99,13 @@ class Menu extends Controller protected function _form_filter(array &$vo) { if ($this->request->isGet()) { + $debug = $this->app->isDebug(); /* 清理权限节点 */ - if ($isDebug = $this->app->isDebug()) { - AdminService::clearCache(); - } + $debug && AdminService::clear(); /* 读取系统功能节点 */ $this->auths = []; - $this->nodes = MenuService::getList($isDebug); - foreach (NodeService::getMethods($isDebug) as $node => $item) { + $this->nodes = MenuService::getList($debug); + foreach (NodeService::getMethods($debug) as $node => $item) { if ($item['isauth'] && substr_count($node, '/') >= 2) { $this->auths[] = ['node' => $node, 'title' => $item['title']]; } diff --git a/app/admin/controller/api/System.php b/app/admin/controller/api/System.php index 682e17c4f..0cae88845 100644 --- a/app/admin/controller/api/System.php +++ b/app/admin/controller/api/System.php @@ -37,8 +37,7 @@ class System extends Controller public function push() { if (AdminService::isSuper()) try { - AdminService::clearCache() && RuntimeService::push(); - sysoplog('系统运维管理', '刷新创建路由缓存'); + RuntimeService::push() && sysoplog('系统运维管理', '刷新发布运行缓存'); $this->success('网站缓存加速成功!', 'javascript:location.reload()'); } catch (HttpResponseException $exception) { throw $exception; @@ -57,8 +56,7 @@ class System extends Controller public function clear() { if (AdminService::isSuper()) try { - AdminService::clearCache() && RuntimeService::clear(); - sysoplog('系统运维管理', '清理网站日志缓存'); + RuntimeService::clear() && sysoplog('系统运维管理', '清理网站日志缓存'); $this->success('清空日志缓存成功!', 'javascript:location.reload()'); } catch (HttpResponseException $exception) { throw $exception;