Skip to content

Instantly share code, notes, and snippets.

@studio3104
Created October 2, 2014 16:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save studio3104/257351c7bc37e0f500bf to your computer and use it in GitHub Desktop.
Save studio3104/257351c7bc37e0f500bf to your computer and use it in GitHub Desktop.
Sinatra で Rack:Session::Dalli を使って SASL 認証付きの memcached を使いたい場合
class App < Sinatra::Base
configure do
use Rack::Session::Dalli,
cache: Dalli::Client.new(
"#{ENV['MEMCACHE_SERVER']}:#{ENV['MEMCACHE_PORT']}",
username: ENV['MEMCACHE_USERNAME'],
password: ENV['MEMCACHE_PASSWORD']
)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment