Hi,
I've just switch to NH 3.x trunk and i got some caching issues.
I'm trying to use SysCacheProvider with Session.Query<T>, i configured
the cache provider with FluentNHibernate but it still hitting my
database... With NH 2.1 cache works fine.
FluentConfiguration configuration = Fluently.Configure();
configuration.Database(MsSqlConfiguration.MsSql2008.ConnectionString(_settings.ConnectionString)
.Cache(p =>
p.UseQueryCache().ProviderClass<SysCacheProvider>())
.Dialect<MsSql2008Dialect>().UseReflectionOptimizer()
.AdoNetBatchSize(50)
.DoNot.ShowSql()
.ProxyFactoryFactory<ProxyFactoryFactory>());
public IQueryable<TEntity> GetQueryable<TEntity>() where
TEntity : class
{
var query = Session.Query<TEntity>();
query.Cacheable();
query.CacheRegion(typeof (TEntity).Name);
query.CacheMode(CacheMode.Normal);
return query;
}
Any idea ?
Thanks.
Yoann. B
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.