Skip to content

Instantly share code, notes, and snippets.

@ik5
Created August 1, 2012 08:09
Show Gist options
  • Save ik5/3224826 to your computer and use it in GitHub Desktop.
Save ik5/3224826 to your computer and use it in GitHub Desktop.
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