The CacheStorage interface provides methods for clearing cache. Cache is cleared asynchronously, so when any of those methods return, it does not mean that all cache data is cleared completely.

To clear the cache and get a notification when cache data is cleared completely you should use the ClearCache(Action onCacheCleared) method.

The following code demonstrates how to clear cache and set up an action which will be run when the cache is cleared successfully:


    Console.WriteLine("The cache is cleared");


    Console.WriteLine("The cache is cleared") 
End Sub)