Question

I'm trying to set up a localCache to augment the Windows Azure Cache Service instances on my WindowsAzure site. To prevent object staleness, I'm setting up clientNotifications, and I'm going to poll every 30 seconds (or less) for updates coming from the main cache.

I'm willing to set up Notification callbacks to handle updates/deletions on objects that I have in my local cache, but I see on the Microsoft documentation that "Cache notifications also provide automatic invalidation of locally cached objects." Does this mean that the system will automatically do this local invalidation for me, once I have enabled Client Notifications? Or is a callback & custom code required? And is this notification guaranteed to arrive at each web instance?

If not, I'll need to set up a callback (for which I have yet to find any concrete C# examples--hint hint). Within the callback I need to invalidate the cached objects within the local cache only (and not have the primary cache get updated because it's already been updated)--what is the method to update the local cache without touching the primary cache?

Thanks -- I hope that made sense (the documentation is lacking).

Was it helpful?

Solution

Okay here's what I've discovered. Once the cache is set to send Notifications, and the local caches are set to receive Notifications, the callback arrives at each instance/role. But the system is smart enough to not require that a callback actually exist, and will change/delete/invalidate the local cache data where the master cache has changed. It's magic, and it's beautiful.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top