Skip to content

Commit

Permalink
Make the namespace for memcached dependent on ruby version.
Browse files Browse the repository at this point in the history
Items cached in 1.8 can't safely be retrieved in 1.9
  • Loading branch information
crowbot committed May 5, 2015
1 parent 8cfea04 commit 27e518b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ class Application < Rails::Application
config.time_zone = ::AlaveteliConfiguration::time_zone

# Set the cache to use a memcached backend
config.cache_store = :mem_cache_store, { :namespace => AlaveteliConfiguration::domain }
config.cache_store = :mem_cache_store,
{ :namespace => "#{AlaveteliConfiguration::domain}_#{RUBY_VERSION}" }
config.action_dispatch.rack_cache = nil

config.after_initialize do |app|
Expand Down

0 comments on commit 27e518b

Please sign in to comment.