This article mainly introduces the relevant information about the implementation method of PHP Yii clear cache. Here is an example of how to implement it. Friends in need can refer to it
PHP Yii clear cache implementation method
The example in this article describes how to clear the cache in Yii. Share it with everyone for your reference, the details are as follows:
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.'); }); }
public function actionClear() { Yii::app()->cache->flush(); }
About Yii2.0 multi-file upload code
For Yii2.0 table association query analyze
The above is the detailed content of How to implement Yii cache clearing. For more information, please follow other related articles on the PHP Chinese website!