i'm using jpa2 level2 cache enabled (jcache/memcache) on gae. have run update transactions , them rely on datastore data , not cached one. tried set javax.persistence.cache.retrievemode property "bypass" when using jpa find method doesn't seem work @ all. wonder if cache bypass possible datanucleus jpa2 ?
code sample :
if (bypasscache) { return find(classname, collections.collections.<string,object>singletonmap("javax.persistence.cache.retrievemode",cacheretrievemode.bypass)); } else return find(classname);
i'm using datanucleus 3.1.3 , appengine 1.7.7.1.
thanks !
after reading source code of datanucleus understand jpa cache bypass not implemented find methods. confirm ?
in fact seems entitymanager.find() methods l2 cached whatever properties set. did jpql query , query result isn't l2 cached. (datanucleus.query.results.cached false default). understanding should use queries fine control of l2 cache.
Comments
Post a Comment