0
votes

I'm getting an error that notifications are not enabled for my cache. I found this post which notes the same problem: Cache Notification config not working in Windows Azure Cache Preview

The answer (which was not accepted) says to change this in the role configuration. I'm not sure this is correct as the only cloud project you can add for caching is the role based cache. I don't see a project type for Windows Azure Cache Preview. My project is working fine without any role setup, but I'm only testing locally. I'm not clear on how to configure notifications for the new Windows Azure Cache preview. I read something about using powershell commands but this was for an older caching library/provider.

I'm basically doing this so i can get a notification when an item expires:

    _dataCache.AddItemLevelCallback(cacheKey, DataCacheOperations.RemoveItem, (cacheName, regionName, key, version, cacheOperation, nd) =>
    {
        NotifyEnd(av.itemId);  // Add callback so we can notify the database that the item has expired
    }, Region);

which of course needs the notifications enabled...

1

1 Answers

0
votes

This turned out to be something really simple. You can enable them from the windows azure management tool (manage.windowsazure.com)... Select the cache item from the menu and configure.