Reputation: 2294
How do I totally disable caching in nHibernate?
Upvotes: 17
Views: 13022
Reputation: 1800
Note IStatelessSession is I think new in Nhibernate 2.0
second level cache configuration details : Chapter 25. NHibernate.Caches
Upvotes: 5
Reputation: 13679
Use the IStatelessSession to bypass the first level cache: http://darioquintana.com.ar/blogging/?p=4
In order to use the second level cache you must explicitly configure it. You will not use it if you don't.
You can also turn off lazy loading in your mappings. lazy=false.
Upvotes: 13