LoginSignup
5
4

More than 5 years have passed since last update.

Railsのsession storeをAmazon ElastiCache(memcached) へ変更した

Last updated at Posted at 2014-07-16
Gemfile
+gem 'dalli'
config/environments/production.rb
   # Use a different cache store in production.
-  # config.cache_store = :mem_cache_store
+  config.cache_store = :dalli_store, 'your_app.hoge.cfg.fuga.cache.amazonaws.com'
config/initializers/session_store.rb
# Be sure to restart your server when you modify this file.

-SeniorMode::Application.config.session_store :active_record_store, key: '_your_app_session'
+SeniorMode::Application.config.session_store ActionDispatch::Session::CacheStore

ん、なんか設定足りてるかな…?

5
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
4