Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

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

m
m
 
(26 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{EclipseLink_UserGuide|info=y}}
+
----
=Caching=
+
The EclipseLink cache is an in-memory repository that stores recently read or written objects based on class and primary key 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.
 
* Manage locking and isolation level.
 
* Manage object identity.
 
  
For more information about the EclipseLink cache and its default behavior, see [[Introduction%20to%20Cache%20(ELUG)|Introduction to Cache]].
+
'''[[Image:Elug_draft_icon.png|Warning]] This page is obsolete. Please see "Understanding Caching" in the ''[http://www.eclipse.org/eclipselink/documentation/ Understanding EclipseLink (Concepts Guide)]'' for current information.'''
  
EclipseLink defines the following entity caching annotations:
 
  
* <tt>[[#How to Use the @Cache Annotation|@Cache]]</tt>
+
----
* <tt>[[#How to Use the @TimeOfDay Annotation|@TimeOfDay]]</tt>
+
* <tt>[[#How to Use the @ExistenceChecking Annotation|@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.
 
  
For more information, see the following:
+
{{EclipseLink_UserGuide|info=y
* [[#What You May Need to Know About Overriding Annotations in JPA|What You May Need to Know About Overriding Annotations in JPA]]  
+
|examples=y
* [[#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]]ing EclipseLink JPA Extensions for Entity Caching==
+
|example=
 
+
*[[EclipseLink/Examples/JPA/Caching|How to use caching]]
The EclipseLink cache is an in-memory repository that stores recently read or written objects based on class and primary key values. EclipseLink uses the cache to do the following:
+
*[[EclipseLink/Examples/JPA/CacheCoordination|How to enable cache coordination]]
 
+
*[[EclipseLink/Examples/JPA/DCN|How to use database event driven cache invalidation]]}}
* Improve performance by holding recently read or written objects and accessing them in-memory to minimize database access.
+
=Caching=
* Manage locking and isolation level.
+
EclipseLink offers a highly performant, robust and functional object cacheCaching is provided at both the persistence context level (L1), and a shared cache at the persistence unit level (L2).  
* Manage object identity.
+
Caching is discussed in the following topics:
 
+
For more information about the EclipseLink cache and its default behavior, see [[Introduction%20to%20Cache%20(ELUG)|Introduction to Cache]].
+
 
+
EclipseLink defines the following entity caching annotations:
+
 
+
* <tt>[[#How to Use the @Cache Annotation|@Cache]]</tt>
+
* <tt>[[#How to Use the @TimeOfDay Annotation|@TimeOfDay]]</tt>
+
* <tt>[[#How to Use the @ExistenceChecking Annotation|@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.  
+
 
+
For more information, see the following:  
+
* [[#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/UserGuide/JPA/Basic JPA Development/Caching/Caching Overview|Caching Overview]]
 +
*[[EclipseLink/UserGuide/JPA/Basic JPA Development/Caching/Configuring|Configuring Caching]]
 +
*[[EclipseLink/UserGuide/JPA/Basic JPA Development/Caching/Shared and Isolated|Shared, Isolated, Protected, Weak, and Read-only Cache]]
 +
*[[EclipseLink/UserGuide/JPA/Basic JPA Development/Caching/Type and Size|Cache Type and Size]]
 +
*[[EclipseLink/UserGuide/JPA/Basic JPA Development/Caching/Expiration|Cache Expiration and Invalidation]]
 +
*[[EclipseLink/UserGuide/JPA/Basic JPA Development/Caching/Coordination|Clustering and Cache Coordination]]
 +
*[[EclipseLink/UserGuide/JPA/Basic JPA Development/Caching/DatabaseEvents|Database Event Notification and Oracle DCN/QCN]]
 +
*[[EclipseLink/UserGuide/JPA/Basic JPA Development/Caching/Indexes|Cache Indexes]]
 +
*[[EclipseLink/UserGuide/JPA/Basic JPA Development/Caching/Query Cache|Query Results Cache]]
 +
*[[EclipseLink/UserGuide/JPA/Basic JPA Development/Caching/Query Options|Query Cache Options and In-memory Querying]]
 +
*[[EclipseLink/UserGuide/JPA/Basic JPA Development/Caching/Cache API|Cache API]]
 +
*[[EclipseLink/UserGuide/JPA/Basic JPA Development/Caching/Interceptors|Cache Interceptors and External Caches]]
  
  
 
{{EclipseLink_JPA
 
{{EclipseLink_JPA
 
|previous= [[EclipseLink/UserGuide/JPA/Basic_JPA_Development/Mapping/Locking/Optimistic Locking|Optimistic Locking]]
 
|previous= [[EclipseLink/UserGuide/JPA/Basic_JPA_Development/Mapping/Locking/Optimistic Locking|Optimistic Locking]]
|next=[[EclipseLink/UserGuide/JPA/Basic_JPA_Development/Caching/Shared and Isolated|Shared and Isolated]]
+
|up=[[EclipseLink/UserGuide/JPA/Basic_JPA_Development|Basic JPA Development]]
|up=[[EclipseLink/UserGuide/JPA/Basic_JPA_Development|Basic JPA Development]]}}
+
|next=[[EclipseLink/UserGuide/JPA/Basic_JPA_Development/Caching/Caching Overview|Caching Overview]]
 +
|version=2.4 DRAFT}}

Latest revision as of 13:50, 5 February 2013



Warning This page is obsolete. Please see "Understanding Caching" in the Understanding EclipseLink (Concepts Guide) for current information.





Caching

EclipseLink offers a highly performant, robust and functional object cache. Caching is provided at both the persistence context level (L1), and a shared cache at the persistence unit level (L2). Caching is discussed in the following topics:


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

Back to the top