Joined May 2014
·

yonah

barcelona
·
·

It does! The thing is that Rails 3 doesn't give you a fetch_multi method, so it's up to whichever cache you are using to implement it. If the method doesn't exist, the gem will fall back on iterating over the collection (the second way you describe) so it becomes more of a convenience method than anything else :)

I'd love your feedback on this: https://github.com/joshblour/jbuilder_cache_multi

it uses fetch_multi in rails 4 to read all keys at once from the cache.

At first I was doing it the first way you described, then the second way, then I wrote this plugin to make it even faster.

Achievements
28 Karma
0 Total ProTip Views
Interests & Skills