I have an asp.net web api that holds objects using MemoryCache. The cache is for one week.
var cacheEntry = _cache.GetOrCreate(CacheKeys.Entry, entry =>
{
entry.SlidingExpiration = TimeSpan.FromSeconds(604800); //One full week
return DateTime.Now;
});
The purpose of this is to not hit the database on every call thus increasing performance of the application.
We want to be able to control the use of this cache through another GUI application.
Is it possible to clear the cache from another application that is also in ASP.Net?