I'm trying to to setup Memcached 2nd level caching. I've followed what documentation I could find, including downloading the project from SVN and looking at how it is configured in their test project, and ended up with this in my app.config.
<configuration>
<configSections>
<section name="memcache" type="NHibernate.Caches.MemCache.MemCacheSectionHandler,NHibernate.Caches.MemCache" />
</configSections>
<memcache>
<memcached host="xx.xx.xx.xx" port="11211" weight="10" />
</memcache>
</configuration>
However, when the MemCache provider code in NHibernate.Caches.MemCache
calls configurationmanager.getsection("memcache")
, null is returned, which causes it to error out.
I have three projects, .UI, .Core, and .Data - the app.config is for .UI and .Data is where SessionFactory
gets built and the code that wants to load this configuration section is launched. .Data has the Nhibernate.Caches.Memcache
reference, and I've tried adding it to .UI, however that did not solve the issue.
What is incorrect about this configuration? Or perhaps is it something about my project? Does anyone have any experience at all with NHibernate.Caches.MemCache
? There is not much information about it to be found via Google.