开发者

yii flush controller cache

开发者 https://www.devze.com 2023-02-18 14:33 出处:网络
How can i implement flushing particular cache for particular get request for controller if controller has next code:

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

public function filters()
    {
            return array(
                    array(
               开发者_Go百科             '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.

0

精彩评论

暂无评论...
验证码 换一张
取 消