0 votes
in Hibernate by

What is the difference between first-level cache and second-level cache? 

1 Answer

0 votes
by

The first level cache is associated with a Session and is used to store the currently loaded objects in memory. The second level cache is associated with a SessionFactory and is used to hold objects across multiple sessions, thereby reducing the number of database queries needed. 

...