Paul Hale
7/23/2008 10:21:00 PM
I would like to store an object in cache for precisely one hour and then it
expires. I have tried the following code but it seems to disappear after
20mins...
HttpContext.Current.Cache.Add("bloggedAPI_Blocked_" + strEmail, myobject,
null, DateTime.Now.AddHours(1), System.Web.Caching.Cache.NoSlidingExpiration,
System.Web.Caching.CacheItemPriority.NotRemovable, null);
I need to set this from a method in my app_code folder and am wondering if
its something to do with HttpContext.Current erasing the cache when the
session times out?
Anybody know where I am going wrong?
Paul.