views:

66

answers:

1
  1. How can I figure out when my current session will run out?
  2. Is the session timeout updated on every request?
+3  A: 

You can find out the answer to the first question by looking in your configuration file in 'app/config/core.php'. It depends on how you've configured your setup. As for the second question, it will update on every page refresh. Config File Info

Dave
// Actual value depends on 'Security.level' setting. Configure::write('Session.timeout', HOUR);What does this mean to me?
powtac
The higher the level, the higher it will multiply your timeout value. More information here: http://book.cakephp.org/view/44/CakePHP-Core-Configuration-Variables
Dave
The higher the security the longer my session will last???
powtac
Yes. So if you set Session.timeout to 1000, then security will multiply that value depending on security. So, high = 1000x10, medium = 1000x100, low = 1000x300
Dave
No, sorry. My mistake, the lower your security. The longer your session will last. My mind completel died.
Dave
This means if I have Session.timeout set to HOUR/10 and Security.level to 'high' my session would last 1 hour?
powtac
Assuming HOUR is defined as 3600 seconds, and not the constant 60 for minutes.
Dave
...updated on every page refresh. You have to do that manually... How??? Where, in app_controller.php, in which action?
powtac
Ok, HOUR is the cake constant with the value (int)3600
powtac
Just double checked, it will automatically update it for you. The behaviour was changed.
Dave

related questions