Assume session is deleted before the cookie holding its id expires, what
happens when client contacts server with this session id? does rails
allocate a new session with a different ID to replace this old session?
2009/7/1 Frederick Cheung
<frederick.cheung-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>
>
> On 1 Jul 2009, at 01:56, Xiahong Gao wrote:
>
> >
> > Hi everyone,
> >
> > how to set the duration of a session? Does
> > "ActionController::Base.session_options[:new_session] = ...
" work?
> > Another question is if i am using database for session storage, when a
> > session expires, will rails automatically remove the session record
> > from database for me?
>
> Nope. sessions never expire in that sense: the cookie containing the
> session id will die when the user exits their browser but your app
> does not (and in general cannot) know about that. It''s up to you
to
> periodically clean out old rows from the sessions table.
>
> Fred
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---