Is it OK to use HttpRuntime.Cache outside ASP.NET applications?

I realize this question is old, but in the interest of helping anyone who finds this via search, its worth noting that .net v4 includes a new general purpose cache for this type of scenario. It’s in the System.Runtime.Caching namespace:

The static reference to the default cache instance is: MemoryCache.Default

Leave a Comment