What is the use of cache in hibernate?



What is the use of cache in hibernate?..

Answer / Satyendra Gupta

Cache in Hibernate is used to store frequently accessed data in memory, reducing the need for database queries and improving performance. It helps minimize the number of times entities have to be retrieved from the database. Hibernate provides several types of caches such as first-level cache (associated with Session objects) and second-level cache (global, persistent across sessions).

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Hibernate Interview Questions

What is a 1 to 1 relationship database?

1 Answers  


How to get single record from database using hibernate?

1 Answers  


What is default cascade in hibernate?

1 Answers  


How to implement one to many relationships with annotation?

1 Answers  


What is proxy in hibernate?

1 Answers  


Why session is not thread safe?

1 Answers  


What are the benefits of named sql query?

1 Answers  


Is hibernate better than jdbc?

1 Answers  


What is hql (hibernate query language)?

1 Answers  


What is scalar query in hibernate?

1 Answers  


What is the use of hibernateutil?

1 Answers  


What is the difference between merge and update method?

1 Answers  


Categories