I am trying yo use caching data as per my project demands
So i coded below
public static void Add<T>(T o, string key, double Timeout)
{
HttpContext.Current.Cache.Insert(
key,
o,
null,
DateTime.Now.AddHours(Timeout),
System.Web.Caching.Cache.NoSlidingExpiration);
}
now , i am calling a this function like
CacheHelper.Add<Employee>(new Employee() { Id = "1", name = "1" }, "Employee", 10000);
By doing above i am getting Error:
"An unhandled exception of type 'System.NullReferenceException'"