The default session was a bit short for me. I expected this would be a setting in app.php. Not finding it in there, I went to the cookbook.
The chapter on sessions has this to say on the topic:
Session configuration is stored in Configure under the top level Session key, and a number of options are available:
Configure? How? What? Where. You can’t even click on Configure to find out what and where this is.
Ok, so let’s go to the chapter after installation called ‘Configuration’. Surely this will help.
The only thing this chapter has to say about configuring your session is to “See the Session Configuration for information on configuring session handling in CakePHP.” which links right back to the chapter on Sessions that never actually tells you how to achieve this.
What can we do to improve the 3.x documentation? The code itself performs fantastically and lots of enhancements are brilliant, but getting the understanding needed to make it work has been a truly an abysmal experience that keeps making me want to hang up my hat and go back to the .NET of my misspent youth… or something.
Before writing this missive, I did read the comments at the bottom of app.php and found tucked away in there the line that indicated how to set the session timeout. I missed this entirely because I expected the default timeout value to be explicitly set and I was looking for that exact piece of code and never saw it.
Wouldn’t it be SO MUCH EASIER to write in the cookbook:
Session configuration is defined /config/app.php… available options are listed in the comment block preceding the default setting