exAspArk / batch-loader

:zap: Powerful tool for avoiding N+1 DB or HTTP queries
https://engineering.universe.com/batching-a-powerful-way-to-solve-n-1-queries-every-rubyist-should-know-24e20c6e7b94
MIT License
1.04k stars 52 forks source link

Add BatchLoader#cache #47

Closed QuinnWilton closed 5 years ago

QuinnWilton commented 5 years ago

This was proposed as a solution to https://github.com/exAspArk/batch-loader/issues/42

I'm finding myself doing a lot of manual, instance-variable based, caching, and this helper would clean my code up a lot. Was there anything preventing this from being merged, or is there anything I can do to get it mergeable?

coveralls commented 5 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 13e01e524e3408c036a179ff826b4f18f363bfc6 on cache into 0e174693400028605a77fd3a63eaea3d9f2f6087 on master.

QuinnWilton commented 5 years ago

If this isn't a concern that you think the gem should handle, then that sounds reasonable to me :) Thanks for the suggestion!