Skip to content

Instantly share code, notes, and snippets.

@ik5

ik5/sessoin.rb

Created Aug 1, 2012
Embed
What would you like to do?
redis_session example
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
You can’t perform that action at this time.