]> git.openstreetmap.org Git - rails.git/blobdiff - config/environments/production.rb
Add memcache support
[rails.git] / config / environments / production.rb
index 5e549a91f73f920b43bffb544fae3a84f0af92f4..457966091416284b01c5f530bee50d30444002f4 100644 (file)
@@ -16,7 +16,10 @@ config.action_view.cache_template_loading            = true
 # config.logger = SyslogLogger.new
 
 # Use a different cache store in production
-# config.cache_store = :mem_cache_store
+if defined?(MEMCACHE_SERVERS)
+  MEMCACHE = Memcached::Rails.new(MEMCACHE_SERVERS, :binary_protocol => true)
+  config.cache_store = :mem_cache_store, MEMCACHE
+end
 
 # Enable serving of images, stylesheets, and javascripts from an asset server
 # config.action_controller.asset_host = "http://assets.example.com"