Understanding EclipseLink, 2.6
  Go To Table Of Contents
 Search
 PDF

8 Understanding Caching

This chapter introduces and describes caching. The EclipseLink cache is an in-memory repository that stores recently read or written objects based on class and primary key values. The cache improves performance by holding recently read or written objects and accessing them in-memory to minimize database access, manage locking and isolation level, and manage object identity.

The entity caching annotations defined by EclipseLink are listed in "Caching Annotations" in Java Persistence API (JPA) Extensions Reference for EclipseLink.

EclipseLink also provides a number of persistence unit properties that you can specify to configure the EclipseLink cache. These properties may compliment or provide an alternative to annotations. For a list of these properties, see "Caching" in Java Persistence API (JPA) Extensions Reference for EclipseLink.

This chapter includes the following sections: