Back to cake db sessions: (1.1.13.4450 )
cake/ libs/session:

session_set_save_handler(array('CakeSession','__open'),
                                                                                
                        array('CakeSession', '__close'),
                                                                                
                        array('CakeSession', '__read'),
                                                                                
                        array('CakeSession', '__write'),
                                                                                
                        array('CakeSession', '__destroy'),
                                                                                
                        array('CakeSession', '__gc'));

and all callbacks are defined there, like:

function __gc($expires) {
                $db =& ConnectionManager::getDataSource('default');
                $table = $db->fullTableName(CAKE_SESSION_TABLE);
                $db->execute("DELETE FROM " . $db->name($table) . " WHERE " . 
$db-
>name($table.'.expires') . " < ". $db->value(time()));
                return true;
         }

All methods are there, bu how to use them?
If cake is configured to store sessions in database, there is no
garbage collection, and expired sessions are left forever in db.
Shoul I clean this somehow, or it's already implemented but buggy.

It is pain to use native PHP sessions for enterprise projects, and I
really need this db session handler.
What is your expirience with this.

tnx and bake all night long.



On Mar 20, 12:55 pm, "Andre" <[EMAIL PROTECTED]> wrote:
> That's right.
>
> By the way, the other framework I'm using is Code Igniter, and the
> custom PHP session library is this 
> one:http://www.codeigniter.com/wiki/PHPSession/.
> The way I see it, it would be great to be able to port a Class like
> that in CakePHP. For some reasons, I don't like my session to last for
> more time than I need (oh well, one could always log out when he's
> done).
>
> On 20 Mar, 00:43, "bernardo" <[EMAIL PROTECTED]> wrote:
>
> > I think that he refers to the default php behaviour when
> > session.cookie_lifetime is set to 0, that means "until the browser is
> > closed"http://php.net/manual/en/ref.session.php


--~--~---------~--~----~------------~-------~--~----~
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