简体   繁体   中英

yii flush controller cache

How can i implement flushing particular cache for particular get request for controller if controller has next code:

public function filters()
    {
            return array(
                    array(
                            'COutputCache -Search -Captcha',
                            'duration'=>86400*31,
                            'varyByParam'=>array('product_slug'),
                            'varyByRoute'=>true,
                            'requestTypes'=>array('GET'),
                            'varyByExpression'=>"Yii::app()->user->hasFlash('contact')"
                    ),
            );
    }

How can i flush cache only for particular get request?

This is something not supported by Yii. Just a thought - You may extend the COutputCache class and implement it yourself.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM