1.the services are all hosted in the same app in IIS
the answer is yes, if you use the MemoryCache.Defaultdefault cache object
From MSDN
This property always returns a reference to the default cache instance. For typical application scenarios, only one instance of MemoryCache is required.
You can use it as below.
ObjectCache cache = MemoryCache.Default;
Is it possible to configure it as follows.
<system.runtime.caching>
<memoryCache>
<namedCaches>
<add name="Default" physicalMemoryLimitPercentage="20"/>
</namedCaches>
</memoryCache>
</system.runtime.caching>
List<string> cacheKeys = MemoryCache.Default.Select(kvp => kvp.Key).ToList();
foreach (string cacheKey in cacheKeys)
MemoryCache.Default.Remove(cacheKey);
2.the services are hosted in different IIS applications on the same server
, , - , - netnamedPipeBinding,