codenoble / cache-crispies

Speedy Rails JSON serialization with built-in caching
MIT License
156 stars 14 forks source link

Use Redis MGET #5

Closed adamcrown closed 4 years ago

adamcrown commented 5 years ago

Currently, we fetch individual records from Redis, which is not great for performance. We should instead use Redis MGET to fetch as many partials in a collection as possible in one call. The only render and cache the misses.

adamcrown commented 4 years ago

This should be supported already by ActiveSupport::Cache::Store#fetch_multi.