Skip to content
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

Domain subclass does not inherit caching from parent #655

Open
leadtrip opened this issue Jan 20, 2023 · 1 comment
Open

Domain subclass does not inherit caching from parent #655

leadtrip opened this issue Jan 20, 2023 · 1 comment

Comments

@leadtrip
Copy link

leadtrip commented Jan 20, 2023

In grails 2, applying cache true in a parent domain class's mapping block would propagate 2nd level caching through to the child domains, this is not the case with grails 4.
This results in attempted retrievals and misses from the cache for the child domain.
The linked sample project displays this behaviour by setting up a Parent and Child domain & calls to both dynamic finder and criteria queries through loading of the index page.
The logged session statistics show that the domain details never seem to be put into the cache.

A non-abstract domain (StandardThing) is also configured to ensure the correct behaviour which can be accessed through the relevant URI.

Sample app
https://github.com/leadtrip/grail4AbstractCache

@dbaylerg
Copy link

dbaylerg commented May 4, 2023

I updated my build.gradle dependencies to include this fix #483 . I would suggest you try to update your sample app dependencies as well to see if it has any effect.

I think we are reporting the same issue although my example does not use an abstract parent class.
#692

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants