aritcle add edit cache
This commit is contained in:
parent
987adc6b5f
commit
6ee23c779e
@ -127,7 +127,7 @@ class Article extends BaseController
|
||||
]);
|
||||
break;
|
||||
}
|
||||
Cache::set('arts'.$ename.$type.$page,$artList,600);
|
||||
Cache::tag('tagArtDetail')->set('arts'.$ename.$type.$page,$artList,600);
|
||||
}
|
||||
|
||||
|
||||
@ -238,6 +238,8 @@ class Article extends BaseController
|
||||
if($result == 1) {
|
||||
$aid = Db::name('article')->max('id');
|
||||
$link = (string) url('article/detail',['id'=> $aid]);
|
||||
//清除文章tag缓存
|
||||
Cache::tag('tagArtDetail')->clear();
|
||||
return json(['code'=>1,'msg'=>'发布成功','url'=> $link]);
|
||||
} else {
|
||||
$this->error($result);
|
||||
|
Loading…
Reference in New Issue
Block a user