Remove ActiveSupport::Cache::MemCacheStore #6296

Closed
wants to merge 4 commits into
from

Conversation

Projects
None yet
8 participants
Owner

guilleiguaran commented May 13, 2012

memcache-client was deprecated in favor of dalli in 2010, now users should be using dalli_store instead of the old mem_cache_store

Owner

rafaelfranca commented May 13, 2012

👍

Member

arunagw commented May 13, 2012

Awesome ❤️

@@ -42,7 +42,8 @@
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
# Use a different cache store in production.
- # config.cache_store = :mem_cache_store
+ # Add dalli to Gemfile for :dalli_store
+ # config.cache_store = :dalli_store
@spastorino

spastorino May 13, 2012

Owner

Do you need to set the cache_store to :dalli_store? Why the gem doesn't do that automatically?

@guilleiguaran

guilleiguaran May 13, 2012

Owner

dalli isn't shipped with a railtie to set this config

cc @mperham

@mperham

mperham May 15, 2012

Contributor

Just a PR away. :-)

@steveklabnik

steveklabnik May 17, 2012

Member

@mperham just sent one ;) ❤️

Owner

jeremy commented May 16, 2012

-1 on removing the cache store entirely. This will make it really painful to upgrade existing apps.

Let's just change the default cache store to Dalli's.

We also need to consider how apps should upgrade cache stores. Existing apps are talking to memcache servers full of marshalled data, and reading it with Dalli won't work. You have to change the cache namespace, or clear it entirely.

The raw API changes slightly too, from a boolean arg to an options hash.

Owner

jeremy commented May 16, 2012

Another option: keep the cache store; just switch the internal lib from memcache-client to dalli.

@steveklabnik steveklabnik referenced this pull request in petergoldstein/dalli May 17, 2012

Merged

Added railtie to set config.cache_store. #217

steveklabnik added a commit to steveklabnik/dalli that referenced this pull request May 17, 2012

Owner

guilleiguaran commented Jun 29, 2012

@jeremy I'm keeping cache store switching it from memcache-client to dalli. See #6903.

Closing this, see #6903

tkrotoff commented Sep 3, 2012

Could you also update the guide "Caching with Rails: An overview": http://edgeguides.rubyonrails.org/caching_with_rails.html#activesupport-cache-memcachestore

Owner

guilleiguaran commented Sep 3, 2012

@tkrotoff done, thanks!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment