EclipseLink query caching

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

EclipseLink query caching

William Dazey
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.

Will Dazey

eclipselink-users mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit