Primary cache in Hibernate

Let us understand Primary cache in Hibernate Primary cache is associated with Session and its enabled by default. So we don’t need to configure anything to enable the Primary cache in our application. Since it is associated with Session, primary cache will be available as long as hibernate session is alive. Once the session is […]

Share this article on

Secondary cache in Hibernate

Let us understand Secondary cache in Hibernate Secondary cache is associated with the SessionFactory and hence its available to the entire application. So objects kept in the secondary cache are available across multiple sessions. Once the session factory is closed, secondary cache is cleared. How secondary cache works ? Whenever we try to load an […]

Share this article on
< Previous