It's never been 100% clear to me when using second level cache with NHibernate, when NHibernate accesses the cache and when it needs to go to the database directly. There is a great explanation of how NHibernate uses caching in The NHibernate FAQ, but even after reading this, I still wasn't completely clear on when NHibernate has to hit the database, so I went about testing it out myself. Below are the results of my testing; I was using NHibernate 2.1.2.400, FluentNHibernate 1.0.0.629, SQLServer 2008 and NCache 3.6. I created a single test consisting of each of the code snippets below and I set the NHibernate show_sql configuration parameter to true so that I could see when NHibernate hit the database. I also created an IClassConvention that tells NHibernate to cache all entities as read write (in reality I would probably be more granular than this). More...