CookieOverflow - 4k Session?

Hello all,

I get the following error when I stuff my seesion with more than 4k of
data.

CGI::Session::CookieStore::CookieOverflow

My problem is that I obviously need a fatter session.
How do other users by-pass the 4k restriction on session variables?

Regards,

John

Hello all,

I get the following error when I stuff my seesion with more than 4k of
data.

CGI::Session::CookieStore::CookieOverflow

My problem is that I obviously need a fatter session.
How do other users by-pass the 4k restriction on session variables?

Don't use the cookie store (which is limited by the fact that cookies
should not be > 4k)

Fred

And I should add that sticking lots of data in the session isn't usually a great idea.

Fred

Frederick Cheung a écrit, le 07/09/2008 03:44 PM :

Don't use the cookie store (which is limited by the fact that cookies should not be > 4k)

And I should add that sticking lots of data in the session isn't usually a great idea.
  
Indeed, in most cases replacing AR objects with their ids is enough. There are cases where that isn't enough though (like storing a long temporary list of ids in session) in this case you have the choice of storing whatever is too big locally (on disk or in DB) with a reference to it in the session but it may not be better than simply using the activerecord/memcache/... sessions. It depends on your actual use case.

Lionel