Access the cache that is associated with the entity manager factory (the "second level cache").
- Returns:
- an instance of
Cache, or null if there is no second-level cache in use.
- Throws:
- if the entity manager factory has been closed.IllegalStateException
- Since:
- Jakarta Persistence (JPA) 2.0