Hi Matt. The reason folks don't prefer to do it within the application code is because it introduces a delay into rendering pages while the DELETE is executed -- even in cases where there is nothing to delete. By running the DELETE in a cron job you improve the performance of your page loads.
-- Scott Moonen On May 9, 8:54 am, "Matt Davies" <[EMAIL PROTECTED]> wrote: > Thanks for getting back to me Arien > > If that's what people are doing to sort it out then that's fine by me, I can > write a cron job to run a script and everyone is happy. > > If anyone has a more elegant solution I'm all ears. > > I suppose I could overwrite sections of the middleware so that whenever a > session is created it checks the table and bins the expired records then, > but I don't want to edit the source code if I can help it, for obvious > upgrading reasons. > > I could pull that middleware into my app to avoid the problem I've just > mentioned, but see how messy it is getting already? > > Is there a reason for keeping records in the django_sessions table once > they've expired? There may be one that I don't know of. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---