CakePHP have several In-built sessions configurations. We can use these sessions as the basis or can create a fully custom solution for that. To use defaults inbuilt sessions, we can simply set the defaults
key to the name and can override any setting in Session config by the code-
Configure::write('Session', array(
'defaults' => 'php'
));
The above will get to use the In-built php session config. You could augment part or all of it by doing the
following:
Configure::write('Session', array(
'defaults' => 'php', 'cookie' =>
'my_app', 'timeout' => 4320 //3 days
));
Built in sessions are ->
Session Handlers-> Session handler is also known as session config array. When they are defined ,they allow us to map the various session_save_handler values to a class.
Database sessions
The changes in session configuration change how you define database sessions.
Cache Sessions
The Cache is used to store sessions. This allows us to store sessions in a cache.
0 Comment(s)