Oh well, there you go. You have the built-in CakePHP GC for session DB :)
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;
}
Beautiful.
-MI
---------------------------------------------------------------------------
Remember, smart coders answer ten questions for every question they ask.
So be smart, be cool, and share your knowledge.
BAKE ON!
blog: http://www.MarianoIglesias.com.ar
-----Mensaje original-----
De: [email protected] [mailto:[EMAIL PROTECTED] En nombre
de AD7six
Enviado el: Lunes, 05 de Febrero de 2007 06:23 a.m.
Para: Cake PHP
Asunto: Re: cake_session table garbage collection
I wonder what that does?
https://trac.cakephp.org/browser/branches/1.1.x.x/cake/libs/session.php#L327
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---