I am using Rails 4.2.1 and memcached. I can't seem to cache a hash. How do I cache a hash?
irb(main):039:0*
irb(main):040:0* Rails.cache.fetch("development_test") do
irb(main):041:1* 'hi'
irb(main):042:1> end
Cache read: development_test
Cache fetch_hit: development_test
=> "hi"
irb(main):043:0> Rails.cache.fetch("development_test")
Cache read: development_test
=> "hi"
irb(main):044:0> Rails.cache.fetch("development_test") do
irb(main):045:1* {'x' => 3}
irb(main):046:1> end
Cache read: development_test
Cache fetch_hit: development_test
=> "hi"
irb(main):047:0> Rails.cache.fetch("development_test")
Cache read: development_test
=> "hi"
irb(main):048:0>