typically a cookie that has no ‘expires’ setting is cached in RAM
and is thus dropped as soon as the browser is shut down. However, the
cookie is stored on disk if an expiration date is specified. I haven’t
tested this behavior with Rails, but I suspect it holds.
i would just set a cookie expiration date if you want to remember
little things between sessions. Large items, sensitive items, or
important data should be stored in a database; storing a lot of
stuff in the session would make scaling more difficult.
i don’t see any real benefit from rolling your own session object
when there are three persistent storage options already available
to you: cookie, session, and activerecord.
Hi everyone, I’m new to Rails and web development. I just bought up the
Agile book and I’ve got a question about the :session_expires option.
In the book, page 317, it says the :session_expires “option should
probably not be used.” Does anyone know why? The book doesn’t explain
or give any indication as to why.
In an application I’m working on I have a need to keep some information
for a very long time between browser sessions. Is it safe to do this
with the session object? Should I roll my own session like object using
the cookies object …
…and use the session object only for things that need
to be remembered for a single browser session and not between browser