Prev Next

Hibernate / Hibernate Caching

What are the different caching techniques in hibernate?

Hibernate provides three type of cache.

  • First level cache : First level cache is associated with session object in hibernate and hibernate uses it by default.
  • Second level cache : Second level cache associates with session factory object. To avail second level cache, we need to configure it in our application.
  • Query level cache : use query-level cache if you need to cache actual query results, rather than just persistent objects. The query cache should always be used in conjunction with the second-level cache.

More Related questions...

Show more question and Answers...


Comments & Discussions