Hello again!
Memcachex is not compatible with Dalli, even if both of them are using JSON as the serializer. The reason is that Dalli will only run the deserialize if a certain bit is set on the flags of the key. Here's the relevant code:
Only deseralize if bit is set:
https://github.com/petergoldstein/dalli/blob/master/lib/dalli/server.rb#L442
Set serialization bit if a serializer is used:
https://github.com/petergoldstein/dalli/blob/master/lib/dalli/server.rb#L435
I'm not entirely sure, but I think the fix would be to set that bit in the flags on the set, add, and replace commands (if a coder is specified).
What do you think?
Hello again!
Memcachex is not compatible with Dalli, even if both of them are using JSON as the serializer. The reason is that Dalli will only run the deserialize if a certain bit is set on the flags of the key. Here's the relevant code:
Only deseralize if bit is set:
https://github.com/petergoldstein/dalli/blob/master/lib/dalli/server.rb#L442
Set serialization bit if a serializer is used:
https://github.com/petergoldstein/dalli/blob/master/lib/dalli/server.rb#L435
I'm not entirely sure, but I think the fix would be to set that bit in the flags on the
set,add, andreplacecommands (if a coder is specified).What do you think?