iis - Common cache for wcf services launched in different servicehosts -


I am hosting my WCF application with IIS. In order to fulfill some of the methods, I need reference of the helper object which is heavily started. A good scenario is to start and cache it once, then all the requests have to use the object from the cache. How do I caching?

The easiest way to use the stable area of ​​mywebmethod is that the IIS has created many services to fulfill the requests. And the stable field will be different in each service host.

I have also tried to use System.Web.HttpRuntime.Cache . Then, I have some independent cache.

To clarify, I do not need to cache the outcome of the request, but some intermediate data required to act on the request.

What could be different then running different services in different app docs gives you crash-protection and some more security-related benefits.

The only way I can get it is to use IIS: Apply one, which will return the custom service host, under the service hood.

Update I stumbled on this today, and this answer looks like total mess. Different service hosts share through the same app if they live within the same IIS site, then the stable field for all services should be the same.


Comments