jodosha/redis-store — pull request #185 by mgoodings (2013-05-20 03:46:21+00:00)
Title: Fix for read_multi not returning deserialized values and potential marshalling issues

read_multi and marshalling were causing me some issues.

Using ActiveSupport::Cache::FileStore

Loading development environment (Rails 3.2.13)
irb(main):001:0> cache = Rails.cache
=> # cache.fetch('testing') { { color: "green" } }
=> {:color=>"green"}
irb(main):003:0> cache.read('testing')
=> {:color=>"green"}
irb(main):004:0> cache.read_multi('testing')
=> {"testing"=>{:color=>"green"}}
irb(main):005:0>

Using ActiveSupport::Cache::RedisStore.new

Loading development environment (Rails 3.2.13)
irb(main):001:0> cache = ActiveSupport::Cache::RedisStore.new
=> #, @options={}>
irb(main):002:0> cache.fetch('testing') { { color: "green" } }
=> {:color=>"green"}
irb(main):003:0> cache.read('testing')
=> {:color=>"green"}
irb(main):004:0> cache.read_multi('testing')
=> {"testing"=>#}
irb(main):005:0>