Quantcast
Channel: Active questions tagged redis+ruby-on-rails - Stack Overflow
Viewing all articles
Browse latest Browse all 873

Rails cache read_multi using array of keys

$
0
0

I am currently trying to get my key value pair out of redis using this function:

Rails.cache.read_multi("asdf:1", "asdf:2")

It works smoothly in the example above, but when I try to get it working with an array of values it returns nil.

keys = ids.map {|id| "asdf:#{id}"}Rails.cache.read_multi(keys)

Anyone has an idea how I get this working?


Viewing all articles
Browse latest Browse all 873

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>