Query Caching [message #1700413] |
Thu, 02 July 2015 13:04 |
Ankit Jain Messages: 1 Registered: July 2015 |
Junior Member |
|
|
I am working on EclipseLink Query caching in very complex system.
I have enabled QueryMonitoring and Performance Monitoring by adding below properties in persistence.xml:
<property name="eclipselink.profiler" value="QueryMonitor" />
<property name="eclipselink.profiler" value="PerformanceMonitor" />
and got below Query Montior log:
com.xxx.yy.zz.jpa.UserInfoEntity-UserInfo.nameSearch 0 4
after that In order to achieve Query caching I have added below property in persistence.xml:
<property name="hibernate.cache.use_query_cache" value="true"/>
and got same Query Montior log again:
com.xxx.yy.zz.jpa.UserInfoEntity-UserInfo.nameSearch 0 4
then in "nameSearch" Named query, I have added below hints as well:
hints={@QueryHint(name="eclipselink.refresh", value="true"), @QueryHint(name="eclipselink.cache-usage", value="CheckCacheThenDatabase")}
after making above changes "UserInfoEntity-UserInfo.nameSearch" log got disappears for the Query Monitor logs.
Can someone tell me, Am I doing right configuration to achieve Query Caching or not?
If yes, then how can I identify that query got cached or not?
Thanks in advance...
|
|
|
Powered by
FUDForum. Page generated in 0.04093 seconds