To use The new Libmemcached and memcached by Evan Weaver , drop these lines on your config/environments/production.rb
1 2 3 4 5 6 7 8 9 10 11 |
# See more on http://blog.evanweaver.com/files/doc/fauna/memcached require 'memcached' config.action_controller.session_store = :mem_cache_store memcached_server = '127.0.0.1:11211' memcached_options = { :namespace => "my_sweet_app_#{RAILS_ENV}", :hash => :default } SESSION_CACHE = Memcached::Rails.new(memcached_server, memcached_options) ActionController::Base.session_options[:cache] = SESSION_CACHE |
memcached is up to 150x faster than memcache-client, and up to 15x faster than caffeine. See BENCHMARKS for details.
READ the docs at : http://blog.evanweaver.com/files/doc/fauna/memcached