Singleton in webservice not retaining values..

Topics: Caching Application Block
Jul 10, 2007 at 7:48 PM

I've implemented the 3.0 cache in a webservice (the webservice uses WSE 3.0). I'm using an inMemory cache. Using the local debug webserver, I can add items to the cache and they'll retain for the defined expiration... When I publish to IIS, each call builds it's own cache despite calling as: this.primitivesCache = CacheFactory.GetCacheManager(); where primitivesCache is the variable defined...

I've created another skeleton service using the same configuration and it retains the values as expected. Any ideas?

Base configuration is below:

<cachingConfiguration defaultCacheManager="PackagerCache">
<add name="inMemory"
type="Microsoft.Practices.EnterpriseLibrary.Caching.BackingStoreImplementations.NullBackingStore, Microsoft.Practices.EnterpriseLibrary.Caching" />

<add name="PackagerCache"
backingStoreName="inMemory" />