Generally we know that every session has its own cache memory. Cache is used to grow the performance of application and database. Caching is a mechanism for storing the loaded objects into a chache memory. By the help of the cache memory we can avoid the number of hits as many as possible to give a better performance for critical applications.
Advantage of cache mechanism:
When we want to load the same object from the database then instead of hitting the database once again, it loads from the local cache memory only, so that the number of round trips between an applications and databaase server got decreased. It means caching mechanism increase the performance of the application.Caching is important to Hibernate as well which utilizes a multilevel caching schemes.