I have a large application that as many, many thousand active sessions. I want to migrate into a Redis session store using this. And ideally, I want my current sessions to stay active.
Does anyone have any experience in migrating active sessions. I assume I write either a migration or a rake task (I think migration, so I can drop the old table as part of this), and I want to just write into redis all the current details.
old_sessions = ActiveRecord::Base.connection.select_all("select * from sessions")
old_sessions.each { |session| $redis.set(????? ????) }
But I am worried about data integrity.