I'm trying to set up a Windows Azure Cache Preview implementation, but I'm running into problems getting the local cache configuration to work. Here is my current config:
<dataCacheClients>
<tracing sinkType="DiagnosticSink" traceLevel="Error" />
<dataCacheClient name="default" requestTimeout="30000"
maxConnectionsToServer="5" isCompressionEnabled="true">
<autoDiscover isEnabled="true" identifier="{My Role Name}" />
<localCache isEnabled="true" sync="NotificationBased"
objectCount="100000" ttlValue="300" />
<clientNotification pollInterval="60" />
</dataCacheClient>
</dataCacheClients>
I create the default cache object using Ninject, like this:
Bind<DataCache>().ToMethod((context) => new DataCacheFactory().GetDefaultCache());
This injection worked fine when I wasn't doing anything with local caching, but I ran into problems putting large data sets into the cache (timeouts), so I figured I would see what behavior would result from using the local cache.
Since I changed the configuration (based on this article on MSDN, see "Caching (Preview) on Roles" in that section), I get the following error:
ErrorCode ERRCA0015:SubStatus ES0001:Notification-based invalidation is not supported because the Cache is not configured to support Notifications.
That is a bit confusing, since I thought that was what the dataCacheClients config section was supposed to be doing. Do I need to programatically set something on the DataCache object itself, or am I missing something in the web config?