You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 1, 2021. It is now read-only.
Came across this gem from a Rails issue and had a similar problem I was going to solve. Thought it might be useful to include the solution in this gem as well.
We know that using includes to eager load associations is a good way to avoid N+1 queries. And obviously using fragment caching is good as well but they don't place nicely together. When fragment caching a relation that includes associations, they will all get loaded in the query to determine the cache key. In my opinion, the included associations should be discarded in this case.
If you're interested in this feature I could give it a go.
The text was updated successfully, but these errors were encountered:
On 2013-02-28, at 3:23 PM, Scott Walkinshaw [email protected] wrote:
Came across this gem from a Rails issue and had a similar problem I was going to solve. Thought it might be useful to include the solution in this gem as well.
We know that using includes to eager load associations is a good way to avoid N+1 queries. And obviously using fragment caching is good as well but they don't place nicely together. When fragment caching a relation that includes associations, they will all get loaded in the query to determine the cache key. In my opinion, the included associations should be discarded in this case.
If you're interested in this feature I could give it a go.
—
Reply to this email directly or view it on GitHub.
Came across this gem from a Rails issue and had a similar problem I was going to solve. Thought it might be useful to include the solution in this gem as well.
We know that using
includes
to eager load associations is a good way to avoid N+1 queries. And obviously using fragment caching is good as well but they don't place nicely together. When fragment caching a relation that includes associations, they will all get loaded in the query to determine the cache key. In my opinion, the included associations should be discarded in this case.If you're interested in this feature I could give it a go.
The text was updated successfully, but these errors were encountered: