Hi!
I’m trying to turn entity cache on. I tried following this manual Entity and Query Cache - CUBA Platform. Developer’s Manual. But when using datasource with cacheable=true i get this warning “Using cacheable query without entity cache for …”, and load time strongly increase(from 8s to 200s).
I tried to add @Cache and @Cacheable annotation to entity, but got same result.
First of all, make sure you specify entity name and not simple class name in app properties (notice $ in the last part): eclipselink.cache.shared.sales$Customer = true
After setting up cache, set the eclipselink.sql logger to DEBUG and restart the server, then you can see in the log whether the number of SQL requests decreases.
I have set the
eclipselink.cache.shared.gantttest$Employee= true
eclipselink.cache.size.gantttest$Employee = 500
in my core - app.properties.
In my dataloader I set the attribute of EmployeeDl: <loader id="employeesDl" cacheable="true">
but It is till giving me the following error: 10:22:25.537 WARN c.h.c.c.s.e.QueryCacheManager - Using cacheable query without entity cache for gantttest_Employee
I have also tried using:
eclipselink.cache.shared.gantttest_Employee= true
eclipselink.cache.shared.GANTTTEST$Employee= true
eclipselink.cache.shared.GANTTTEST_Employee= true
@shipilov
I created a testproject but was not able to reproduce the error as well (with a single entity).
So I went to look deeper into the project with the issue. My Employee entity had a one-to-many composition with the Task entity. The employee entity was set cachable but the Task entity was not. In my screen dataloader I am getting the Employee with the Task entity as an attribute. But the Task entity is not cached. That’s why I was getting the warning:
“Using cacheable query without entity cache for gantttest_Employee”
Because the uncached Task entity was obtained trough the Employee entity. (I think).
Thank you for confirming there was nothing wrong with the syntax I used for the entity caching, I thought I made a mistake here somewhere.