> I would run a findall to select only those with > $session['Mysession']['expires']>time() and loop over those. Garbage > collection is handled by PHP and you need not write your own - even if > you insist I would say it would be easier to write a custom SQL query > and delete in one fell swoop instead of looping...
good improvement ! the delete loop can be replaced by a conditional find. > Among other things wouldn't it be more efficient to have a timestamp > in the user table which is updated in beforeFilter? and checked at > login time? here i disagree. it's less effort to: $this->Session->write('User.logged_in', 1); upon successful login. and if($this->Session->readSessionVar('User.logged_in') == 1){ in beforeFilter in app_controller.php best, jyrgen --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---