Or if you are using MySQL 5.1 as a backend for your session you have
the ability to schedule a task that can delete the sessions that are
5min or older.

On Jun 25, 5:53 pm, Nicholas Henry <[email protected]> wrote:
> Here's any example of a rake task that cleans out sessions that are
> some many weeks old:
>
> http://topfunky.net/svn/plugins/topfunky_power_tools/tasks/database.rake
>
> You can call the rake task in a cron job, but clearing them out every
> five minutes seems a little extreme. I wondering if you are after
> something to timeout the session if it hasn't been modified for the
> last five minutes. Then you are after something like SessionTimeout:
>
> http://github.com/lukeredpath/session-timeout/tree/master
>
> HTH,
> Nicholas
>
> On Jun 25, 6:28 pm, gaoxh gaoxh04 <[email protected]> wrote:
>
>
>
> > sorry for confusion. for databased session
>
> > 2009/6/25 Nicholas Henry <[email protected]>
>
> > > yes to which one?
>
> > > On Thu, Jun 25, 2009 at 3:08 PM, gaoxh gaoxh04<[email protected]> wrote:
> > > > yes..
>
> > > > 2009/6/25, Nicholas Henry <[email protected]>:
>
> > > >> Do you mean how to timeout a session, or clean up old sessions in the
> > > >> database (when using table-based session, opposed to cookie-based
> > > >> sessions)?
>
> > > >> Cheers,
> > > >> Nicholas
>
> > > >> On Jun 24, 11:22 pm, Xiahong Gao <[email protected]> wrote:
> > > >> > Hi everyone,
>
> > > >> > I am a newb. Can anyone tell me how to do session cleanup? I want to
> > > >> > cleanup those sessions which haven't been modified in recent 5
> > > >> > minutes. How to make it a background process in my rails application?
>
> > > >> > thanks in advance,
>
> > > >> > xiahong >>
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to