While I was trying to use first level cache in a Castle ActiveRecord based application I found some points that like to share:
1. First level cache is alive within a single session (NHibernate’s ISession) only.
2. First level cache is enabled by default and can not be disabled.
3. If you don’t use SessionScope properly you may have more than one session per ASP.NET web request. So you will not profit from first level cache. SessionScope is Castle ActiveRecord’s way for NHibernate’s ISession. Correct way to use SessionScopt in an ASP.NET web application is to use SessionScopeWebModule as a httpModule. More info could be found here.
4. First level cache can be used only by NHibernate Load and Get methods. So with Castle ActiveRecord you can only use Find and TryFind method. FindAll and other methods can not benefit from first level cache because they use ICriteria internally.
More info about NHibernate caching is available here.