[Solved] Coutputcache: Prevent Flash Message From Getting Cached?
Posted 13 November 2012 - 12:01 AM
Any thoughts on how to prevent this?
Posted 14 November 2012 - 02:03 PM
The other alternative I guess is to not cache the entire action response for this one particular view and instead cache some of the queries it uses.
Posted 15 November 2012 - 02:43 AM
You can try to disable the cache, if a flash message is available. For example you could use the duration parameter inside your filters() method (if that's where you defined the output cache):
'duration' => Yii::app()->user->hasFlash('your-key') ? 0 : $yourCacheTime,