O'Reilly logo

Learning NHibernate 4 by Suhas Chatekar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Caching

We have briefly touched the topic of caching in multiple places earlier. Caching support in NHibernate is more extensive than most of the frameworks that I have come across so far. Following are the three different types of caches available in NHibernate:

  • Session level cache: ISession caches every entity that it loads from the database. This is default behavior and cannot be changed or turned off.
  • Query cache: At individual query level, you can specify if the output of that query needs to be cached. This cache is shared across sessions.
  • Second level cache: This is similar to session level cache but it is shared across all the sessions in a session factory. Due to its shared nature, this cache is most complex of all and comes with settings ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required