Monday, May 17, 2010

Rails - wiping sessions from the ActiveRecordSession store

Rails doesn't clean up it session. This will wipe the active record sessions in the newer version of rails without wasting as much memory as a destroy all.

rows = ActiveRecord::SessionStore::Session.delete_all ["updated_at < ?", time]

No comments:

Post a Comment