We are using NCache as a 2nd level cache for NHibernate.

A local console test app is able to retrieve items from the cache.

However in our web app we receive 'Cache is not initialized'

We are using WCF to connect through a front site to a back site which runs the queries.

Anyone have any ideas on how to fix this error?

Thanks

有帮助吗?

解决方案

Found out the problem to this was the way we were registering our backend WCF services with Castle.

Using 'PerWcfOperation' or any other registration apart from Transient caused this error.

Set our service lifecycles to Transient and it works as expected.

Will look through the Castle source to find out why.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top