I am doing my first cake app. and had a go with the cache and the
simple user authentication examplified in the user guide. My problem
is, however, that as soon as I turn on cache, my check for a session
variable is not done - seemingly.

The session var is the user object which is saved upon login.
In app_controller I have a function

      function checkSession() {
               if(!($this->Session->check('User')) {
                      $this->redirect('/users/login');
                      exit();
               }
      }

which is called by using beforeFilter() in each controller.
When the user hits "logout", the session var is deleted and is
redirected to login-page.
If the user tries to enter a valid url, the checkSession() should be
run. This doesn't happen if the cache is turned on (the effect is not
visible, nevertheless). The page is rendered.

What am I doing wrong? Is the cache read and output before dispatcher
takes control if the cache is turned on??

Please, help!


An other thing; debug level 3 doesn't work properly. I never get any
object dump, only sql log.

t.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to