- http://openjpa.apache.org/builds/1.2.3/apache-openjpa/docs/ref_guide_caching.html
- http://openjpa.apache.org/builds/1.2.3/apache-openjpa/docs/ref_guide_caching.html#ref_guide_cache_pmevict
- https://www.ibm.com/support/knowledgecenter/was_beta/com.ibm.websphere.base.doc/ae/tejb_datcacheconfig.html
- https://www.ibm.com/support/knowledgecenter/SSAW57_8.0.0/com.ibm.websphere.nd.doc/info/ae/ae/rdyn_openjpa.html
- http://www.developer.com/java/using-second-level-caching-in-a-jpa-application.html
- http://docs.oracle.com/javaee/6/tutorial/doc/gkjjj.html
- http://blog.jhades.org/setup-and-gotchas-of-the-hibernate-second-level-and-query-caches/
- http://www.javalobby.org/java/forums/t48846.html
- http://docs.jboss.org/hibernate/orm/3.5/reference/en/html/performance.html
- http://www.coderpanda.com/jpa-caching/
- http://tech.puredanger.com/2009/07/10/hibernate-query-cache/
When Query cache is bypassed?
The evictAll method with no arguments clears the cache.
Most caches are of limited size. Pinning an identity to the cache ensures that the cache will not kick the data for the corresponding instance out of the cache, unless you manually evict it.
StoreCache Usage
import org.apache.openjpa.persistence.*;
...
OpenJPAEntityManagerFactory oemf = OpenJPAPersistence.cast(emf);
StoreCache cache = oemf.getStoreCache();
cache.pin(Magazine.class, popularMag.getId());
cache.evict(Magazine.class, changedMag.getId());
No comments:
Post a Comment