On Mon, Aug 3, 2009 at 5:17 PM, s.ross<cwdi...@gmail.com> wrote:

> Well, what you are both looking at doing is:
>
> Session.delete_all, :conditions => ['updated_at < ?', 10.minutes.ago]
>
> That translates into a pretty quick database query, depending on the
> number of sessions you anticipate having. WDYT?

Right, finding old sessions isn't the hard part :-)

The question is rake via cron/equiv versus background task.

Speaking only for myself, I'd need to run this much more often, say
every 2 or 3 minutes, and do related cleanup tasks as part of session
removal, meaning this would require most of the Rails environment.

-- 
Hassan Schroeder ------------------------ hassan.schroe...@gmail.com
twitter: @hassan

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to