What is 2nd level cache in hibernate?



What is 2nd level cache in hibernate?..

Answer / Reeta Joshi

"The 2nd level cache in Hibernate is a session-independent cache. It stores data fetched from the database, which can be shared across multiple sessions and even multiple threads. This cache helps in reducing the number of queries to the database for the same data by reusing previously loaded objects."

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Hibernate Interview Questions

How do you switch between relational databases without code changes?

1 Answers  


What will happen if we don’t have no-args constructor in entity bean?

1 Answers  


Why do we need mapping?

1 Answers  


Is a mapping in hibernate?

1 Answers  


How to bind hibernate session factory to jndi?

1 Answers  


What the four ORM levels are in hibernate?

1 Answers  


What is cascade type?

1 Answers  


What is difference between save and persist method in hibernate?

1 Answers  


What is hbm2ddl in hibernate?

1 Answers  


What are the different id generating strategies using @generatedvalue annotation?

1 Answers  


Can you declare mappings for multiple classes in one mapping file?

1 Answers  


What are the advantages of using hibernate over jdbc?

1 Answers  


Categories