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 …
برای فراخوانی رکوردها از دیتابیس (بر اساس primary key) به حافظه دو راه در NHibernate وجود دارد. یکی Get و دیگری Load. متود Get برای دستیابی به رکورد مربوطه مستقیماً به cache یا database مراجعه میکند در حالی که متود Load تا زمانی که کسی propertyی غیر از id را فراخوانی نکرده به دیتابیس مراجعه …