php yii清理缓存的实现方法
本文实例讲述了yii清理缓存的方法。分享给大家供大家参考,具体如下:
html:
<button onclick="clearcache()">clearcache</button>
js:
function clearcache()
{
$.get('../eng/index.php?r=site/clear&'+new date().gettime(),function(){
alert('clear eng cache ok.');
});
}
php:
public function actionclear()
{
yii::app()->cache->flush();
}
感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:)!