Skip to content

Instantly share code, notes, and snippets.

@jonasschneider
Created October 5, 2010 12:46
Show Gist options
  • Save jonasschneider/611490 to your computer and use it in GitHub Desktop.
Save jonasschneider/611490 to your computer and use it in GitHub Desktop.
require "sinatra"
require "dalli"
dc = Dalli::Client.new('localhost:11211')
get '/' do
"Value is: " + dc.get('abc')
end
get '/set' do
dc.set('abc', params[:value])
"Value set: "+params[:value]
end
run Sinatra::Application
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment