- How can I figure out when my current session will run out?
- Is the session timeout updated on every request?
views:
66answers:
1
+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
2009-11-26 22:45:21
// Actual value depends on 'Security.level' setting. Configure::write('Session.timeout', HOUR);What does this mean to me?
powtac
2009-11-26 22:50:14
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
2009-11-26 22:52:07
The higher the security the longer my session will last???
powtac
2009-11-26 22:53:26
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
2009-11-26 22:54:54
No, sorry. My mistake, the lower your security. The longer your session will last. My mind completel died.
Dave
2009-11-26 22:55:47
This means if I have Session.timeout set to HOUR/10 and Security.level to 'high' my session would last 1 hour?
powtac
2009-11-26 23:02:20
Assuming HOUR is defined as 3600 seconds, and not the constant 60 for minutes.
Dave
2009-11-26 23:05:55
...updated on every page refresh. You have to do that manually... How??? Where, in app_controller.php, in which action?
powtac
2009-11-26 23:06:37
Ok, HOUR is the cake constant with the value (int)3600
powtac
2009-11-26 23:09:04
Just double checked, it will automatically update it for you. The behaviour was changed.
Dave
2009-11-26 23:15:33