I would love to remove all items from MemoryCache.
What I have tried already:
var listDBCalls = ((FixedSizedQueue<DalCacheDto>)MemoryCache.Default.Get($"DAL_CACHE_{HttpContext.Current?.User?.Identity?.Name}"))?.ToList();
listDBCalls.clear();
If I watch this code in debugger, it shows that listDBCalls is really empty. But, calling again:
((FixedSizedQueue<DalCacheDto>)MemoryCache.Default.Get($"DAL_CACHE_{HttpContext.Current?.User?.Identity?.Name}"))?.ToList()
is showing me that all items are still there. Why is that?