Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] EclipseLink query caching

Hello!
I am looking into using EclipseLink's "eclipselink.query-results-cache" property to disable the query cache. However, setting this property as a query hint or in the persistence.xml doesnt seem to do anything that I can see.
For my testing, I am running the following query in a loop:

for (int i = 0; i < 4; i++) {
    TypedQuery<Member> q = em.createQuery("select m from Member m where m.memberId=:memberId", Member.class);
     q.setParameter("memberId", 2782L);
     List<Member> memberList = q.getResultList();
}

Running this loop, I observe EclipseLink getting the earlyReturn value each time (from the l2 cache?)! Does this property do what I think it does?

Also, setting <property name="eclipselink.cache.shared.default" value="false" /> does not seem to change anything either.

Thanks,
Will Dazey

Back to the top