빠른 사용 방법 NCache NHibernate로?

사용 NCache NHibernate 애플리케이션을 사용하는 것은 다단계 프로세스입니다.

1. 설치 및 구성 NCache 앱 서버에서

설치 및 구성 NCache 다음 단계로 요약할 수 있습니다.

  1. 설치 NCache 모든 앱 서버 및 캐시 서버에서
  2. 캐시 클러스터 생성
  3. 구성 remote clients
  4. 캐시 클러스터 테스트
  5. 자세한 내용은 7분 시청 NCache 비디오 시작하기 위한 XNUMX단계.

2. 구성 NCache 레벨 2 공급자로

사용하려면 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> 

3. 지정 NCache NHibernate 속성

이제 구성했으므로 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 캐시를 데이터베이스와 동기화하려는 경우 속성. 자세한 내용은 제품 설명서를 참조하십시오.

다음에 무엇을할지?

© 저작권 Alachisoft 2002 - . 판권 소유. NCache 는 Diyatech Corp.의 등록상표입니다.