First-Level Cache
The mandatory persistence-context cache in Hibernate/JPA that maintains one managed entity instance per identity within a unit of work.
Technical Context
It is scoped to the persistence context rather than shared globally. It provides identity consistency and supports dirty checking, but a long-lived context can retain many managed entities and grow memory use; clear, detach, batching, or read-only strategies may be needed.
Related Concepts
- Persistence Context
- Dirty Checking
- EntityManager
- unit of work