Jump to: navigation, search

Difference between revisions of "EclipseLink/UserGuide/JPA/Basic JPA Development/Caching/Caching Overview"

(Caching Overview)
Line 14: Line 14:
 
The EclipseLink cache is an in-memory repository that stores recently read or written objects based on class and Id values. EclipseLink uses the cache to do the following:
 
The EclipseLink cache is an in-memory repository that stores recently read or written objects based on class and Id values. EclipseLink uses the cache to do the following:
  
* Improve performance by holding recently read or written objects and accessing them in-memory to minimize database access.
+
* Improve performance by holding recently read or written objects and their relationships and accessing them in-memory to minimize database access.
 
* Manage locking and isolation level.
 
* Manage locking and isolation level.
 
* Manage object identity.
 
* Manage object identity.
  
For more information about the EclipseLink cache and its default behavior, see [[Introduction%20to%20Cache%20(ELUG)|Introduction to Cache]].
+
EclipseLink offers an integrated and functional cache including the following features:
  
EclipseLink defines the following entity caching annotations:
+
* isolated persistence context cache (L1), and shared persistence unit cache (L2)
 +
* caching configurable at the Entity level, entities can be cached, or not, cached entities can reference non-cached entities
 +
* multiple cache type options (weak, soft, full, weak-cache, soft-cache)
 +
* configurable size
 +
* cache indexes
 +
* in-memory querying and conforming
 +
* time to live, and daily cache invalidation
 +
* clustered cache coordination
 +
* database event driven cache invalidation and Oracle DCN/QCN
 +
* support for JPA 2.0 @Cachable configuraiton and API
 +
* extended JpaCache API
 +
* query cache
  
* <tt>@Cache</tt>
+
EclipseLink supports the following caching annotations:
* <tt>@TimeOfDay</tt>
+
* <tt>@ExistenceChecking</tt>
+
  
EclipseLink also provides a number of persistence unit properties that you can specify to configure the EclipseLink cache (see [[#How to Use the Persistence Unit Properties for Caching|How to Use the Persistence Unit Properties for Caching]]). These properties may compliment or provide an alternative to the usage of annotations.
+
* @Cachable
 +
* @Cache
 +
* @ExistenceChecking
 +
  
For more information, see the following:
+
EclipseLink also provides a number of persistence unit properties that you can specify to configure the EclipseLink cache (see [[#How to Use the Persistence Unit Properties for Caching|How to Use the Persistence Unit Properties for Caching]]). These properties may compliment or provide an alternative to the usage of annotations.
* [[#What You May Need to Know About Overriding Annotations in JPA|What You May Need to Know About Overriding Annotations in JPA]]
+
* [[#What You May Need to Know About Using EclipseLink JPA Persistence Unit Properties|What You May Need to Know About Using EclipseLink JPA Persistence Unit Properties]]
+
  
 
{{EclipseLink_JPA
 
{{EclipseLink_JPA

Revision as of 09:32, 7 May 2012



Caching Overview

The EclipseLink cache is an in-memory repository that stores recently read or written objects based on class and Id values. EclipseLink uses the cache to do the following:

  • Improve performance by holding recently read or written objects and their relationships and accessing them in-memory to minimize database access.
  • Manage locking and isolation level.
  • Manage object identity.

EclipseLink offers an integrated and functional cache including the following features:

  • isolated persistence context cache (L1), and shared persistence unit cache (L2)
  • caching configurable at the Entity level, entities can be cached, or not, cached entities can reference non-cached entities
  • multiple cache type options (weak, soft, full, weak-cache, soft-cache)
  • configurable size
  • cache indexes
  • in-memory querying and conforming
  • time to live, and daily cache invalidation
  • clustered cache coordination
  • database event driven cache invalidation and Oracle DCN/QCN
  • support for JPA 2.0 @Cachable configuraiton and API
  • extended JpaCache API
  • query cache

EclipseLink supports the following caching annotations:

  • @Cachable
  • @Cache
  • @ExistenceChecking


EclipseLink also provides a number of persistence unit properties that you can specify to configure the EclipseLink cache (see How to Use the Persistence Unit Properties for Caching). These properties may compliment or provide an alternative to the usage of annotations.

Eclipselink-logo.gif
Version: 2.2.0 DRAFT
Other versions...