Skip to main content

Home/ Java World/ Group items tagged EclipseLink

Rss Feed Group items tagged

Hendy Irawan

Java Persistence/Caching - Wikibooks, open books for an open world - 0 views

  •  
    Caching is the most important performance optimization technique. There are many things that can be cached in persistence, objects, data, database connections, database statements, query results, meta-data, relationships, to name a few. Caching in object persistence normally refers to the caching of objects or their data. Caching also influences object identity, that is that if you read an object, then read the same object again you should get the identical object back (same reference). JPA 1.0 does not define a shared object cache, JPA providers can support a shared object cache or not, however most do. Caching in JPA is required with-in a transaction or within an extended persistence context to preserve object identity, but JPA does not require that caching be supported across transactions or persistence contexts. JPA 2.0 defines the concept of a shared cache. The @Cacheable annotation or cacheable XML attribute can be used to enable or disable caching on a class.
1 - 1 of 1
Showing 20 items per page