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