mperham/dalli — Issue #129: Session::DalliStore#get: Unable to unmarshal value: undefined class/module
Author: chewi
Created: 2011-10-11 17:31:38+00:00
State: open

I'm trying to use the Dalli session store with Rails 3.1.1. It seems to be unable to unmarshal my model classes. Apparently memcache-client (or the older memcache?) used to have the same problem but if I use :mem_cache_store with exactly the same arguments, it works fine. I can't see what it's doing differently to Dalli.

```ruby
require 'action_dispatch/middleware/session/dalli_store'

Enchanted::Application.config.session_store :dalli_store, {
:cache => Dalli::Client.new("localhost:11211", :namespace => "enchanted_#{Rails.env}_session"),
:key => "_enchanted_#{Rails.env}_session",
:expire_after => 2.hours
}
```

Nothing out of the ordinary here, I think. Here is how it was solved in the past but this is probably outdated now. The original server has gone as it is, hence the need for archive.org!

http://web.archive.org/web/20100910080153/http://kballcodes.com/2009/09/05/rails-memcached-a-better-solution-to-the-undefined-classmodule-problem/