第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Nhibernate二級緩存

Nhibernate二級緩存

揚(yáng)帆大魚 2018-12-06 16:00:39
最近學(xué)緩存,我配置好像都通過編譯,而且已經(jīng)成功運(yùn)行,但是我調(diào)試的時候,發(fā)現(xiàn)ISessionFactory對象里面沒有我已經(jīng)配置好的緩存,配置如下: config里面的: ?<property name="cache.provider_class">NHibernate.Caches.SysCache.SysCacheProvider, NHibernate.Caches.SysCache</property>????? ????? <property name ="cache.use_second_level_cache">true</property>????? <property name="cache.use_query_cache">true</property> hmb文件里面的: <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"? assembly="Test" namespace="Test">? <class name="Test.Person,Test" table="person" >??? <cache usage="read-write"/>??? <id name="Id" column="id" type="string" >??? </id>??? ??? <property name="PerName" column ="perName" type="string" length="30" not-null="true"/>??? <property name ="Password" column="password" type="string" length="30" not-null="true"/>??? ??? <set name="ListMessage" table="MessageContext" cascade="all" >????? <cache usage="read-write"/>????? <key column="idPerson" not-null="true"/>????? <one-to-many class="Test.messageContext,Test"/>??? </set>??? <one-to-one? name="Message"? class="Test.NewsMessage,Test" cascade="all"/>? </class>? </hibernate-mapping> 調(diào)試的時候只能在Statistics.SecondLevelCacheRegionNames屬性里面看到名字,沒發(fā)現(xiàn)有數(shù)據(jù)存入。 然后我有使用了查詢緩存: ?IQuery qury = session.CreateQuery("from Person where Id =:idin").SetCacheable(true);??????????? qury.SetParameter("idin", this.txtUserID.Text); 調(diào)試,結(jié)果這個查詢緩存在Statistics.SecondLevelCacheRegionNames里根本就沒有。
查看完整描述

1 回答

?
呼如林

TA貢獻(xiàn)1798條經(jīng)驗(yàn) 獲得超3個贊

短消息回過了這個問題

查看完整回答
反對 回復(fù) 2019-01-21
  • 1 回答
  • 0 關(guān)注
  • 353 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號