Skip to content

Instantly share code, notes, and snippets.

@nileshbetter
Created August 23, 2010 09:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nileshbetter/545144 to your computer and use it in GitHub Desktop.
Save nileshbetter/545144 to your computer and use it in GitHub Desktop.
cache_settings = YAML.load_file("#{RAILS_ROOT}/config/memcached.yml")
config.cache_store = :mem_cache_store, cache_settings['servers'], cache_settings
config.action_controller.session = {
:memcache_server => (Rails.env == 'defaults') ? cache_settings['session_servers'] : cache_settings['servers'],
:namespace => "defaults:session",
:expire_after => 5.days
}
config.action_controller.session_store = :mem_cache_store
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment