I want to have this cached query in NHibernate:
Configuration configurationEntry = session.CreateQuery("from Configuration configurationEntry where configurationEntry.Name = 'DefaultVendorId'").SetCacheable(true).UniqueResult<Configuration>();
I have
<property name="cache.use_query_cache">true</property>
in the NHibernate configuration file.
However, when I run the NHibernate profiler I see that NHibernate executes the query multiple times .. I obviously want the query executed only once and the result cached. Any ideas ?
Regards,
MadSeb
I hope its the same as in Java Hibernate….you have to add a linkage to your cache provider…because Hibernates provides none…
This is part of my Java-Hibernate configuration that links cache provider.