开发者

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(
               开发者_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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜