使い方 NCache NHibernate アプリケーションを使用するのは、複数のステップからなるプロセスです。
インストールと構成 NCache 次の手順に要約できます。
詳細については、7 分間のビデオをご覧ください NCache ビデオオン 始めるためのXNUMXつのステップ.
有効にする NCache NHibernate のレベル 2 プロバイダーとして、次の行を app.config または web.config ファイルに追加します。
<hibernate - configuration>
...
<session - factory>
...
<property name = "cache.provider_class">
Alachisoft.NCache.Integrations.NHibernate.Cache.NCacheProvider,
Alachisoft.NCache.Integrations.NHibernate.Cache
</property>
</session - factory>
</hibernate - configuration>
これで設定が完了しました NCache NHibernate のレベル 2 プロバイダーになるには、以下を提供する必要があります。 NCache 特定のプロパティ。 これらのプロパティは役立ちます NCache アプリケーションを操作します。
<configSections>
...
<section name = "ncache"
type = "Alachisoft.NCache.Integrations.NHibernate.Cache.NCacheSection,
Alachisoft.NCache.Integrations.NHibernate.Cache"/>
</configSections>
上の行では「」を指定しています。ncache設定ファイルの「」セクション。次に指定します。 NCache この「」のプロパティncache" セクション。
<ncache>
<!--default regionis used if no other regions are specified.-->
<region name = " default ">
<add key = " cacheName " value = " myCache " />
<add key = " enableCacheException " value = " false " />
</region>
<!--see docs for custom regions & db - synchronization properties.-->
</ncache>
もっとあります NCache キャッシュをデータベースと同期する場合は、プロパティを使用します。 詳細については、製品ドキュメントを参照してください。