Use the default ICacheStorageProvider implementation that stores items in HttpRuntime.Cache (DefaultCacheStorageProvider).
Expected: all cache entries for the current tenant will be removed.
Actual result: all items from HttpRuntime.Cache will be removed, also causing the application to be restarted. This makes such a call extremely dangerous (and totally misleading).
Potential fix: ICacheStorageProvider.Clear() should accept a prefix parameter and DefaultCacheStorageProvider should use a LINQ Where clause to only list items with matching key. Downside is that this would be inefficient with many cache items. However this
is pretty much what DefaultCacheStorageProvider in Orchard.OutputCache uses.
Probably handling tenant-awareness is something that ICacheStorageProvider implementation should handle anyway (and not the ICacheService implementation that currently builds prefixed cache keys).
Also since HttpRuntime.Cache can be used by anything DefaultCacheService could use a more unique key pattern, e.g. Orchard.Caching.TenantName_Key.
BTW probably it would be better to refactor OutputCache to use ICacheService under the hood, so we'd only have to implement one interface for a new (e.g. distributed) provider, see: