dsfs64664 2014-06-04 10:42
浏览 128

yii删除所有查询缓存

I am using Yii 1.14 on centos 5 with php 5.2.4. I am doing query caching like Projects::model()->cache(timeout,dependancy)->findAll(array()). Now I have many of these. is there a way to clear all the query cache of this application. i cannot seem to find any info of adding these cache queries to a group and then delete the group from the cache. The problem is i have many applications using memcache and i do not want to flush it every time before a update. I only want to clear all cache related to this application.

Updated I would like to flush the app cache on the beginning and end of update. i have no file beginning with cache in that location

 ll paradox/protected/runtime/
total 164
-rw-r--r-- 1 apache apache 155571 Jun  3 15:53 application.log
drwxr-xr-x 2 apache apache   4096 Jun  4 11:53 gii-1.1.12
drwxr-xr-x 2 apache apache   4096 Jun  4 11:53 gii-1.1.14

Looking at the logs the Yii::app()->cache->flush does following

<28 new auto-negotiating client connection
28: Client using the ascii protocol
<28 get ns9e5np1ss92i7mqkjues577o1
>28 sending key ns9e5np1ss92i7mqkjues577o1
>28 END
<39 version
>39 VERSION 1.4.5
<39 flush_all
>39 OK

That looks like it clears all the memcache?

  • 写回答

3条回答 默认 最新

  • dousui4577 2014-06-04 10:56
    关注

    if you need it after update s/ redeploy an option is to manually deleting the file:
    /protected/runtime/cache-1.1.xx.db

    评论

报告相同问题?

悬赏问题

  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大