Cache Implementation

Pavanandey
Posted by Pavanandey under ASP.NET category on | Views : 2669
dataset ds = new dataset();

HttpContext.Current.Cache.Insert("CacheName", ds, null, DateTime.Now.AddMinutes(1), Cache.NoSlidingExpiration);

here the dataset is kept in cache with name CacheName , with the time for 1 min.

while Reterving

ds= (DataSet)HttpContext.Current.Cache["CacheName"];

Comments or Responses

Login to post response