What are the main pros and cons for using HttpRuntime Cache against using simple static field?
I need to store data in scope of entire ASP.NET application.
HttpRuntime.Cache["MyData"] = someHashtable;
vs.
private static System.Collections.Hashtable _myData;
public static System.Collections.Hashtable MyData
{
get
{
if (_myData == null)
{
_myData = new System.Collections.Hashtable();
// TODO: Load data
}
return _myData;
}
}