-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
should inverse_of work? #357
Comments
This is working as intended.
You need to replace the
|
That fetches the client from cache for every person and results in different client objects:
My problem is that I have some expensive associations already fetched in the client that I would like to reuse on I guess I can set that up myself with something like this:
But I'm still wondering if it isn't something that IdentityCache could do. If you're open for it I could try to create a pull-request. Thanks! |
Oh I see. It looks like cache_has_many with Yes, it would make sense if the inverse cached association were set on the returned records. By the way, I think that works for cache_has_many associations with the |
I've started by adding tests for the Do you agree that the two failing ones should be fixed?
|
Yes, although you don't need both of those tests, since the only difference is that one tests the default value of the cache_has_many |
Not sure if it's a misconfiguration on my side or if it's simply not supported.
Rails 5.1.4
identity_cache 0.5.1
Given:
Without the cache the client isn't fetched again when we fetch persons on a client:
With IdentityCache I get a client query for every person and different objects. Shouldn't IdentityCache simply setup the association to the existing client object?
The text was updated successfully, but these errors were encountered: