diff --git a/app/index/controller/Index.php b/app/index/controller/Index.php index 9c7632d..b6b9b70 100644 --- a/app/index/controller/Index.php +++ b/app/index/controller/Index.php @@ -97,7 +97,7 @@ class Index extends Common $content = View::fetch(); - Cache::tag('page_cache')->set($page_cache_key, $content); + Cache::tag('page_cache')->set($page_cache_key, $content, 600); return $content; } @@ -111,69 +111,4 @@ class Index extends Common return $this->success('退出成功', $back_url); } - /** - * 显示创建资源表单页. - * - * @return \think\Response - */ - public function create() - { - // - } - - /** - * 保存新建的资源 - * - * @param \think\Request $request - * @return \think\Response - */ - public function save(Request $request) - { - // - } - - /** - * 显示指定的资源 - * - * @param int $id - * @return \think\Response - */ - public function read($id) - { - // - } - - /** - * 显示编辑资源表单页. - * - * @param int $id - * @return \think\Response - */ - public function edit($id) - { - // - } - - /** - * 保存更新的资源 - * - * @param \think\Request $request - * @param int $id - * @return \think\Response - */ - public function update(Request $request, $id) - { - // - } - - /** - * 删除指定资源 - * - * @param int $id - * @return \think\Response - */ - public function delete($id) - { - // - } } diff --git a/app/index/controller/Post.php b/app/index/controller/Post.php index 1f2469e..0316240 100644 --- a/app/index/controller/Post.php +++ b/app/index/controller/Post.php @@ -12,36 +12,6 @@ use think\Request; class Post extends Common { - /** - * 显示资源列表 - * - * @return \think\Response - */ - public function index() - { - // - } - - /** - * 显示创建资源表单页. - * - * @return \think\Response - */ - public function create() - { - // - } - - /** - * 保存新建的资源 - * - * @param \think\Request $request - * @return \think\Response - */ - public function save(Request $request) - { - // - } /** * 显示指定的资源 @@ -69,7 +39,7 @@ class Post extends Common return $this->error('链接已失效', '/'); } - Cache::set($cache_key, $model_post); + Cache::set($cache_key, $model_post,600); } @@ -82,39 +52,4 @@ class Post extends Common return View::fetch(); } - - - /** - * 显示编辑资源表单页. - * - * @param int $id - * @return \think\Response - */ - public function edit($id) - { - // - } - - /** - * 保存更新的资源 - * - * @param \think\Request $request - * @param int $id - * @return \think\Response - */ - public function update(Request $request, $id) - { - // - } - - /** - * 删除指定资源 - * - * @param int $id - * @return \think\Response - */ - public function delete($id) - { - // - } }