Yii 清理缓存
html:
1 <button onclick="clearCache()">ClearCache</button>
js:
1 function clearCache() 2 { 3 $.get('../eng/index.php?r=site/clear&'+new Date().getTime(),function(){ 4 alert('Clear eng cache ok.'); 5 }); 6 7 }
php:
public function actionClear() { Yii::app()->cache->flush(); }