On 3/20/07, majna <[EMAIL PROTECTED]> wrote: > > 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?
As long as you follow the pre-defined standards for the naming of your functions and/or methods, PHP itself wil know what to do. That function above *is* the garbage collection routine. I know that a lot of what PHP does in relation to sessions is hidden behind the scenes. Until you write your own custom session handler, you don't really know what you are getting yourself into. :) > 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. > As I mentioned above, PHP itself will take care of calling the correct methods and/or functions to handle garbage collection of expired sessions. Honest. -- Chris Hartjes My motto for 2007: "Just build it, damnit!" rallyhat.com - digital photo scavenger hunt @TheBallpark - http://www.littlehart.net/attheballpark @TheKeyboard - http://www.littlehart.net/atthekeyboard --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---