Problem with InvalidateStoreApplicationCache Function

Apr 16, 2009 at 12:41 PM
We have been using the WCF Cache successuflly for some time and it works great.

Recently one of our developers added a call to InvalidateStoreApplicationCache("storeName", "ApplicationName") in their application.
Right after this function gets called, all other users start getting "Store not found or Store permission denied" error.

It looks like when this function gets called, the entire cache is replaced by a cache of just that store. I think the intent of the function is to refresh the cache for that one store/Application and keep the cache intact for the other stores.


Apr 16, 2009 at 1:04 PM
Hi usood,
by design, the method InvalidateStoreApplicationCache("storeName", "ApplicationName") is used by the NT service when in the .config file are setted both the StoreNameFilter and the ApplicationNameFilter.
This method destroy the old cache and rebuild a new one but with the StoreName and ApplicationName only (if provided).
If you want to invalidate the cache for just an application (or just a store) you must use ever the InvalidateCache() methods (without parameters).
CheckAccess can be invoked without any problems while Cache rebuilding because the new Cache will replace the old one only after cache building process has finished.

Apr 16, 2009 at 2:18 PM
Hi Andrea,

Thanks for the explanation.

We have a fairly large group of developers over who we have no direct control. If they see a function as available they may use it. So, to prevent this kind of problem in the future, we will hide the InvalidateStoreCache(string storeName) and the InvalidateStoreApplicationCache(string storeName, string applicationName) functions. We don't want one developer of one store to be able to bring down all other applications!

Umesh Sood
Apr 16, 2009 at 2:39 PM
Edited Apr 16, 2009 at 2:46 PM
you have right.
For the next coming release ( I will remove the InvalidateCache(...) overloads (with parameters) from the WCF Service Contract.