By default, Rails doesn’t nuke expired sessions from your app’s storage of choice (either PStores/files or rows in a database table, usually). On my personal site, there’s just under a million entries in the session table alone – somewhat of a waste as it keeps building over time.
To counter this, you can implement this handy code snippet via a Cron job (or run it manually if you don’t have access to Cron or similar tools, you poor poor bastich).
Related posts:
- 18 Free Text Editors To Clean Up Your Code Have you ever considered using a free text editor for...
- Feeling Overwhelmed? Clean Your Desk Does clutter make you work harder everyday? Alyssa gives some...
- Interesting CSS Quirks: Border-spacing I came across a CSS peculiarity recently that had me...
- Announcing Version 1.1 of CodeBurner: the Reference Tool for Firebug A new version of the SitePoint Reference Tool for Firebug,...
- MySQL: the Pros and Cons of MyISAM Tables MySQL offers several database table types, but which is suitable...







March 31st, 2008 at 10:09 pm