2006-03-12

Where to store Rails session data?

During first days of development I didn't care much for session data. Rails put those in files in /tmp by default - and that was fine with me. Sometimes stale sessions were causing problems with my applications but a quick cleanup was all I needed.

Those session related errors got more annoying when I deployed my application on Textdrive with it's full of Rails data /tmp directory. So I moved to database-based session storage.

But for some reason recently I started to see new kind of session related errors. When application was reloaded in development mode it often failed in a very strange place - while re-setting routes. Guess there must have been some incompatibilities between Edge Rails database session storage and Engine dependency handling. Luckily Edge Rails also introduced cleanups in file-based session storage. So once again I am storing all my session data in file system.

Now the question is: Was this trip really necessary?

0 comments: