Upgrading memcached-client to Dalli - legacy cached values aren't getting deserialized #314

Closed
eladmeidar opened this Issue Jan 10, 2013 · 2 comments

2 participants

@eladmeidar

When Dalli attempts to load a cache key that was populated originally by MemcachedClient (Rails 3.2.9) - the value returns as a Marshalled ActiveSupport::Cache::Entry object and not the original cached items.

code for example:

@users = Rails.cache.fetch("users") do
  User.first
end

Deleting the key, and repopulating using Dalli works as expected.

@eladmeidar

So it appears that this is the expected behavior by Dalli. Dalli will not deserialize a value that doesn't have the compression / serialization flags. Memcached-client does that anyway.
Found this to follow up my assumption http://rubydoc.info/github/mperham/dalli/Dalli/Client/MemcacheClientCompatibility but it seems to be missing from the current stable release, ideas?

@mperham
Collaborator

Dalli 1.x made a point to consider backwards compatibility with m-c. 2.x has diverged from that a bit as I've added features and simplified some things (like the dalli_store implementation).

@mperham mperham closed this May 27, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment