Home  >  Article  >  Backend Development  >  Yii清理缓存的方法,Yii清理缓存方法_PHP教程

Yii清理缓存的方法,Yii清理缓存方法_PHP教程

WBOY
WBOYOriginal
2016-07-12 09:01:271222browse

Yii清理缓存的方法,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();
}

希望本文所述对大家基于Yii框架的PHP程序设计有所帮助。

您可能感兴趣的文章:

  • yii,CI,yaf框架+smarty模板使用方法
  • Yii使用技巧大汇总
  • Yii快速入门经典教程
  • YiiFramework入门知识点总结(图文教程)
  • yii权限控制的方法(三种方法)
  • php定时删除文件夹下文件(清理缓存文件)
  • PHP使用redis实现统计缓存mysql压力的方法
  • PHP中常见的缓存技术实例分析
  • PHP 9 大缓存技术总结
  • ThinkPHP文件缓存类代码分享

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/1089199.htmlTechArticleYii清理缓存的方法,Yii清理缓存方法 本文实例讲述了Yii清理缓存的方法。分享给大家供大家参考,具体如下: html: 复制代码 代码如下: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