Delete Cache Value

How to delete cache fragment which was created by beginCache()?

I found that I can pass duration=0 setting but its allowed only from 1.1.18.

My current version is 1.1.3.

Could you please check this link

Thx but it doesnt work in case when i used beginCachen to cache some html. U can try it on yourself

Hi _axl.

I’m afraid there are no direct solutions for the deleting of fragment cache in the Yii versions before 1.1.18.

The workarounds are:

  1. upgrade Yii;

  2. set 1 second of duration and sleep for 1 second (see http://php.net/manual/en/function.sleep.php).

Best regards

I don’t understand why you have to delete the cache content manually.

I believe we don’t need to do it when we have set the cache dependencies appropriately.