How to clear the cache in Yii, how to clear the cache in Yii
The example in this article describes the method of clearing the cache in Yii. Share it with everyone for your reference, the details are as follows:
html:
Copy code The code is as follows:0e44e95a56a88b3861172243a4127e41ClearCache65281c5ac262bf6d81768915a4a77ac0
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();
}
I hope this article will be helpful to everyone’s PHP program design based on the Yii framework.
Articles you may be interested in:
- How to use yii, CI, yaf framework smarty templates
- A summary of Yii usage tips
- Yii Quick Start Classic Tutorial
- Summary of knowledge points for getting started with YiiFramework (picture and text tutorial)
- Yii permission control methods (three methods)
- php regularly deletes files in folders (clear cache files) )
- PHP uses redis to implement statistical caching mysql pressure
- Analysis of common caching technology examples in PHP
- Summary of PHP 9 major caching technologies
- ThinkPHP File caching code sharing
http://www.bkjia.com/PHPjc/1089199.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1089199.htmlTechArticleYii's method of clearing cache, Yii's method of clearing cache. This article describes the method of Yii's method of clearing cache. Share it with everyone for your reference, the details are as follows: html: Copy the code The code is as follows: bu...
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn