The Entity Manager cache is there is for keeping data around during a multi-request flow, often called a "conversation;" however, the persistence unit cache is meant to really be a performance booster for read-only or read-mostly data. OpenJPA provides a data-level cache at the persistence unit level. OpenJPA provides a Single JVM cache provider. This may be ideal for read-only data that is initialized during the startup of an application.
For Example:
<property name="openjpa.DataCache" value="true(CacheSize=5000, SoftReferenceSize=0)"/>
<property name="openjpa.QueryCache" value="CacheSize=1000, SoftReferenceSize=100"/>
<property name="openjpa.RemoteCommitProvider" value="sjvm"/>
"svjm" here means "single jvm". Is there any other option here? How to use caching in distributed environment?
No comments:
Post a Comment