Topic: Sessions Question


I'm a new convert to Rails from Java, and I also don't have much experience with web programming, other than HTML/CSS/JS. I want to write a game where player data such as inventory and personal stats need to persist over several months. Would Sessions be a good place to store the models that hold this data?

In my head, it looks like the User Profile will hold the SessionID, which will have hashes to Inventory, Stats, whatever. I'm just wondering if this is an obviously bad idea before I start coding (ie - do Sessions auto-delete, or are they notoriously inefficient, or is this just not the right track for some reason). Thanks very much for any advice!

Re: Sessions Question

No, sessions are only meant for storing data throughout a web browser session, definitely not a month.  Typically sessions are used to store login information.  You'll want to store your data in a database, which is what Rails does very well.

Re: Sessions Question

I appreciate the help!

Last edited by bheilig (2006-11-14 03:34:34)