I'm using gem 'dalli' but the same problem happen with gem memcached-client
development.rb
config.cache_store = :dalli_store
My app controller
Rails.cache.write('presidentes', Candidato.by_cargo(:key => "Presidente")) @presidentes = Rails.cache.read('presidentes')
If I debug the @presidentes var it returns
--- !binary | BAhvOiBBY3RpdmVTdXBwb3J0OjpDYWNoZTo6RW50cnkJOhBAZXhwaXJlc19p bjA6EEBjb21wcmVzc2VkRjoLQHZhbHVlbzoyQ291Y2hSZXN0OjpNb2RlbDo6
instead of
- !map:Candidato nome_para_urna: RUI COSTA PIMENTA nome_completo: RUI COSTA PIMENTA _rev: 1-ab77e6c2549a64c9e46d4d4ee5bf99c9
I've already try to store in
:raw => truebut stills the same problem.
UPDATE 09/27
The problem is the YAML object that Marshall seems to don't understand.