Created
June 10, 2009 00:12
-
-
Save ggoodale/126921 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>> class Session < ActiveRecord::Base; end # So we can access the sessions table directly | |
=> nil | |
>> s = Session.first | |
=> #<Session id: 1, session_id: "bd0568033d143fafaa1f9752c43b61d7", data: "BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g...", created_at: "2008-12-10 15:50:58", updated_at: "2008-12-10 17:50:47"> | |
>> session_data = Marshal.load(Base64::decode64(s.data)) | |
=> {"flash" => {}} | |
>> Rails.cache.write("rack:session:#{s.session_id}", session_data) | |
=> true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment