Home Rails Cache - ASCII characters showing up?
Reply: 0

Rails Cache - ASCII characters showing up?

user549 Published in March 19, 2018, 12:52 am

I'm attempting a simple Rails cache fetch and I'm getting a bunch of ascii characters as a result. I want to fetch something from the cache, if it misses, then just return an empty array.

Rails.cache.fetch('store_links') { [] }

When I run it in console as an empty array I get: [1] development ยป Rails.cache.fetch('store_links') { [] } => "\x04\b[\x00"

If it helps: This was working in Rails 3 but now failing with Rails 4.

Any information would be helpful! Thanks!

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.314069 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO