What is the limit of .NET Cache keys that I can store?

I want to store up to 500 cache keys (one for each user) with System.Web.Caching. The cached value must not exceed 11 characters (eg "Los Angeles")

string key = "Location" + userName;
string location = GetUsersLocation();
Cache.Insert(key, location);

      

Does this hinder the limitations of .NET caching, or would it be contrary to best practices?

+3


source to share


1 answer


the cache limit depends on the available system memory and the worker process if running in 64 bit or 32 bit.
you will be able to use much more memory when running in 64 bits.
ASP.NET Cache will deal with garbage collection and will start dropping the cache when the memory usage of the w3wp process is greater than or equal to about 80% of the working working memory limit. The worker process memory limit can be set in the machine.config for aspnet_wp.exe, or in the IIS metabase for w3wp.exe.



0


source







All Articles