Rails Sessions - Disabling and Garbage Collection


#1

Is there a way to turn sessions off in Rails? Doesn’t appear to be.

Also, is there any garbage collection for stale sessions?

On those two topics, are there any problems with Rails handling those
options?

I ask because it seems like something that would have been included.

If there is no technical reason why it wasn’t included, then I’ll
create/submit a source patch to add them.

Thanks

Bob S.

http://www.railtie.net/


#2

Sessions are used for flash, so if you use flash then donÂ?t disable the
sessions.
You can set
::ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS = false
to dissable the sessions processing

Abuot the garbage collection topic, I have no idea

Rodrigo Domínguez
Consultor
Av. Directorio 183 1º Piso
Tel: 4921-1648 / 4926-1067
Cel: 15-5695-6027
mailto:removed_email_address@domain.invalid removed_email_address@domain.invalid
http://www.rorra.com.ar/ www.rorra.com.ar

-----Mensaje original-----
De: removed_email_address@domain.invalid
[mailto:removed_email_address@domain.invalid] En nombre de Bob S.
Enviado el: sábado, 28 de enero de 2006 14:50
Para: removed_email_address@domain.invalid
Asunto: [Rails] Rails Sessions - Disabling and Garbage Collection

Is there a way to turn sessions off in Rails? DoesnÂ?t appear to be.

Also, is there any garbage collection for stale sessions?

On those two topics, are there any problems with Rails handling those
options?
I ask because it seems like something that would have been included.
If there is no technical reason why it wasnÂ?t included, then IÂ?ll
create/submit a source patch to add them.

Thanks

Bob S.
http://www.railtie.net/


#3

Is there a way to disable sessions on per Controller or
Controller/Action combination?

Seems a waste to use them for machine interfaces such
as web services and such cases where there’s no need
for a session.

And, if there isn’t, then I’ll submit a patch for that.


– Tom M.


#4

Tom M. wrote:

Is there a way to disable sessions on per Controller or
Controller/Action combination?

Yes,

session :off
session :off, :only => %w(foo bar)

http://api.rubyonrails.com/classes/ActionController/SessionManagement/ClassMethods.html#M000080

Phil


#5

Rockin’ Good!

:slight_smile:

Thanks.


– Tom M.