I'm wondering if the Enterprise Library Caching using isolated storage (disk, not DB) can be accessed by multiple apps in IIS? That is, can they all share the same instance of it.
I have various WCF services running on one machine, set up in different web apps (and potentially in different app pools, if that makes a difference). They all need access to a shared cache.
I had been told that this is possible with EntLib, but after doing some reading I'm not entirely sure this is the case. All of the services are running under NETWORK SERVICE user, but since they are all different apps in IIS does this prevent the sharing? I
know having a different user certainly would.
So, can the same user use the same cache across multiple apps, or is it limited to within one app?
Feb 23, 2013 at 3:20 AM
Edited Feb 23, 2013 at 5:05 PM
Based on what you wrote, you are probably going to want to use a distributed cache option such as Windows Server AppFabric.
Isolated storage is not going to work. If you are using IIS7 with the default ApplicationPoolIdentity then you will actually be running different AppPools as different users (and different IsolatedStorage locations). If you configure a specific local account
to access the cache then you will get a Mutex error trying to open the IsolateStorage.
You could use the Database as the backing store but this would probably only be appropriate for a fairly static readonly cache that is loaded at startup. That may fit your scenario but usually it's a bit limiting for a multiple application/instance cache where
you want to add items to the cache and then have other instances aware of the newly cached values.
You could look at entlibextensions.codeplex.com
for a Cache Manager extension for AppFabric. That might minimize any existing code changes since you can use the existing Enterprise Library interface.
Enterprise Library support engineer