this could be some browser cache issue
there is a controller method called disableCache()
this this one.
it will set the appropriate headers!


On 11 Jul., 11:38, Michael Christoff <michael.n.christ...@gmail.com>
wrote:
> I was wondering whether the issue below had ever been solved...
>
> http://cakephp.1045679.n5.nabble.com/Non-caching-of-flash-elements-td...
>
> Basically the problem is that in my layout (default.ctp), my flash
> messages are not being displayed.
>
> Specifically:
>
> Case 1
> ----------------
> 1.
> In MyController.view1
> I use setFlash and redirect to /my/view2
>
> 2.
> Page redirects
>
> 3.
> No flash message displays in the layout
>
> 4.
> I switch to ANY view of MyController and no flash message displays
>
> ------------------
>
> Case 2
> 1. In MyController.view1
> I use setFlash and redirect to /my/view2
>
> 2.
> Page redirects
>
> 3.
> No flash message displays in the layout
>
> 4.
> I switch to ANY view of a controller != MyController and * the flash
> message DISPLAYS *
>
>    << it essentially gets delayed by one page >>
> ------------
>
> Case 3
> 1. In MyController.view1
> I use setFlash and redirect to /**other**/view2
> (note the *'s are just to highlight I'm switching to a different
> controller's view, namely OtherController)
>
> 2.
> Page redirects
>
> 3.
> Flash message DISPLAYS in the layout
>
> ------------------
>
> As Joel Stein mentions in his post (linked above) this only is a
> problem for flash messages in the layout, not the view. ALSO:
>
> <cake:nocache>
>     <?= $session->flash() ?>
> </cake:nocache>
>
> does not work,
>
> <!-- <cake:nocache> -->
>     <?= $session->flash() ?>
> <!-- </cake:nocache> -->
>
> does not work.
>
> I have also tried deleting the Cake cache but this does not work.
>
> I do not want to turn off all page caching...
>
> Is there any way to make cake explicitly *not* cache the layout if it
> knows it there is a flash message waiting in the session?
>
> Thanks for any help.
>
> -mike
>
> I have searched the web and seen this question come up many times and
> never answered

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to