Top "Memorycache" questions

The MemoryCache class is a concrete implementation of the abstract ObjectCache class in .Net

Locking pattern for proper use of .NET MemoryCache

I assume this code has concurrency issues: const string CacheKey = "CacheKey"; static string GetCachedData() { string expensiveString =null; if (MemoryCache.Default.…

c# .net multithreading memorycache
How to clear MemoryCache?

I have created a cache using the MemoryCache class. I add some items to it but when I need to …

c# caching memory .net-4.0 memorycache
MemoryCache Thread Safety, Is Locking Necessary?

For starters let me just throw it out there that I know the code below is not thread safe (correction: …

c# multithreading wcf memorycache
Memory Cache in dotnet core

I am trying to write a class to handle Memory cache in a .net core class library. If I use …

c# caching .net-core memorycache
MemoryCache does not obey memory limits in configuration

I’m working with the .NET 4.0 MemoryCache class in an application and trying to limit the maximum cache size, but …

c# .net caching memorycache
MemoryCache AbsoluteExpiration acting strange

I'm trying to use a MemoryCache in .net 4.5 to keep track of and automatically update various items, but it seems …

c# .net memorycache
Is MemoryCache scope session or application wide?

I'm using MemoryCache in ASP.NET and it is working well. I have an object that is cached for an …

asp.net caching memorycache
Memory Cache .Net 4.0 performance test : astonishing result

This performance test is wrong or the system cache is working with exceptional performance? This is my result : [13] number of …

c# performance validation .net-4.0 memorycache
C volatile variables and Cache Memory

Cache is controlled by cache hardware transparently to processor, so if we use volatile variables in C program, how is …

c computer-science volatile computer-architecture memorycache
MemoryCache Empty : Returns null after being set

I have a problem with an MVC 3 application that is using the new .NET 4 System.Runtime.Caching MemoryCache. I notice …

asp.net .net asp.net-mvc caching memorycache