3.7.4.1.2. Data Cache
Data Cache examines caching in OpenJPA. Metadata extensions allow individual classes to override system caching defaults.
OpenJPA defines the org.apache.openjpa.persistence.DataCache annotation for caching information. This annotation has the following properties:
-
boolean enabled: Whether to cache data for instances of the class. Defaults totruefor base classes, or the superclass value for subclasses. If you set this property tofalse, all other properties are ignored. -
int timeout: The number of milliseconds data for the class remains valid. Use -1 for no timeout. Defaults to theopenjpa.DataCacheTimeoutproperty value.