PHP Yii清理缓存的实现方法
本文实例讲述了Yii清理缓存的方法。分享给大家供大家参考,具体如下:
html:
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();
}
感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!
Copyright© 2013-2020
All Rights Reserved 京ICP备2023019179号-8