You should have a look to the swToolboxPlugin [1], I have no time to explain the file, but the idea is the primary action which create the cache is executed once, but a second action is started which update only user variables.
[1] http://trac.symfony-project.org/browser/plugins/swToolboxPlugin/sf1.2/trunk/lib/filters/swUserContextCacheFilter.class.php On Fri, Apr 24, 2009 at 2:53 PM, Alexandru-Emil Lupu <[email protected]>wrote: > what do you mean "cached action" ? > if the file that contains the action is in cache folder, does not mean the > action is cached. > what is cached is the view. > if you have some issues about "CSRF" or things like that, see that it was a > topic 2-3 days ago. > about the " > > What I don't like about this is that each time it is called, it > executes 2 actions. > > Do you figure out some other better solution? > " > > i think i have an idea "function preExectute(){ /* do some foo here */ > }"... > Alecs > > On Fri, Apr 24, 2009 at 3:29 PM, HiDDeN <[email protected]> wrote: > >> >> Hello. I have a little problem in Symfony. >> >> The short question is: how could I update the user session inside a >> cached action? >> >> >> And the long question is: >> >> I have an action that is cached. Inside this action I have a portion >> of code that updates the user session. >> >> The solution I have found is this (briefly): >> >> public function executeIndex($request) >> { >> ... here I update the session >> >> $this->forward('home', 'home'); >> } >> >> public function executeHome($request) >> { >> ........ my code >> } >> >> >> >> >> Using this workaround, I cache only the Home action, letting the Index >> to update the session. >> >> What I don't like about this is that each time it is called, it >> executes 2 actions. >> >> Do you figure out some other better solution? >> >> >> > > > -- > I am on twitter: http://twitter.com/alecslupu > I am on linkedIn: http://www.linkedin.com/in/alecslupu > > > > > > -- Thomas Rabaix http://rabaix.net --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---
