[LRUG] Rails session stores?

Matthew Rudy Jacobs matthewrudyjacobs at gmail.com
Wed Apr 25 08:47:43 PDT 2012


A few years ago I did a quiz game.

At first I kept the game data in the session
(a pre-randomised list of questions, the answers given, time limits and
such)

It was kind of hard to work with.
quickly I realised that this data belonged in a "Game" model. With the
logic and persistence in one place.

I stuck it in the database, put the "game_id" in the session, and
everything was good.

On Wednesday, 25 April 2012, Joel Chippindale <
joel.chippindale at econsultancy.com> wrote:
> The general level of surprise about the amount of session data we store
in sessions in itself feels like an answer to my question,
> Time for a bit of refactoring,
> J.
>
> On 25 April 2012 14:44, Ed James (Alt) <ed.james.spam at gmail.com> wrote:
>>
>> Can you explain a bit more about why you're storing gigs of data in your
sessions?
>> --
>> Ed James
>> Sent with Sparrow
>>
>> On Wednesday, 25 April 2012 at 14:41, George Sheppard wrote:
>>
>> That may well be the case. Some of the bigger chunks of data we
currently hold in sessions are looking like candidates for extracting into
a separate store at the moment.
>>
>> What sort of objects / data are you storing in the session?
>> George
>> On 25 Apr 2012, at 14:36, Joel Chippindale wrote:
>>
>> On 25 April 2012 14:19, Dan Singerman <dansingerman at gmail.com> wrote:
>>
>> I think if you have gigabytes of session data, you are _probably_ doing
something wrong somewhere.
>>
>>
>> That may well be the case. Some of the bigger chunks of data we
currently hold in sessions are looking like candidates for extracting into
a separate store at the moment.
>>
>>
>> Or you could buy more ram for your redis server(s)
>>
>> Of course ;o)
>> J.
>> _______________________________________________
>> Chat mailing list
>> Chat at lists.lrug.org
>> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>>
>> _______________________________________________
>> Chat mailing list
>> Chat at lists.lrug.org
>> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>>
>> _______________________________________________
>> Chat mailing list
>> Chat at lists.lrug.org
>> http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20120425/0a0cdb67/attachment-0003.html>


More information about the Chat mailing list