Created
August 1, 2012 08:09
-
-
Save ik5/3224826 to your computer and use it in GitHub Desktop.
redis_session example
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
require 'rubygems' | |
require 'redis_session' | |
session = Session::SessionClient.new(:prefix => 'add_test') # init the session | |
session.save('name', { 'name' => 'session'}) # Saving a content. Pure ruby content | |
restored = session.restore('name') # return to me a pure ruby content | |
puts restored.inspect | |
session.remove('name') # delete the key |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment