Using memcached

CS290F Fall 2006 - UCSB Computer Science - Thorsten von Eicken

Jump to: navigation, search

Memcached is already installed in the newest EC2 image, so start with that one. If you want to use an older image, you need to install libevent and memcached yourself.

Session storage

To store Rails sessions in memcached, change the session store in config/environment.rb (or production.rb):

config.action_controller.session_store = :mem_cache_store

Fragment cache store

To store the fragment cache in memcached, change the fragment store in config/environment.rb (or production.rb):

config.action_controller.fragment_cache_store = :mem_cache_store, "localhost"

See the Rdoc for additional information.

Other uses

No specific recommendations, search Google... Make sure you keep your system consistent!

Personal tools