• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Diffrentiating First and Second Level caching in Hibernate?

 
vijin das
Ranch Hand
Posts: 129
Firefox Browser Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is First and Second Level caching in Hibernate?
why caching is important in hibernates senario ...??
need explanation ???


 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The first level cache is implicit in the Session. The second level cache is configurable declaratively and requires a third party implementation (such as EHCache).

Caching is important in any database backed application to prevent huge numbers of round trips to the database. This tends to be the bottle neck in database applications.

The documentation covers this in more detail.
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Paul,

Does 2nd level caching detect changes made to db from another application ? Does it refresh ?

Thanks,Pradeep
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic