I recently introduced the NHibernate.Caches.SysCache into my application to cache some very common queries. I created a unit test like the following to ensure it was properly working.
[Test]public void DoesNotLoadEntityFromSysCache(){ Foo foo = new Foo(); foo.Name = "Craig"; using (ISession s = OpenSession()) { s.Save(foo); } using (ISession s = OpenSession()) { Foo result = (Foo)s.CreateCriteria(typeof(Foo)) ...
posted @ Tuesday, September 09, 2008 10:45 AM |