Created
October 2, 2014 16:52
-
-
Save studio3104/257351c7bc37e0f500bf to your computer and use it in GitHub Desktop.
Sinatra で Rack:Session::Dalli を使って SASL 認証付きの memcached を使いたい場合
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
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