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

    评论

报告相同问题?

悬赏问题

  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥15 stable diffusion
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘