You should be able to have an absolute or sliding expiration by calling an insert on HttpRuntime.Cache. It has several overloads. Example:
HttpRuntime.Cache.Insert("EXAMPLE_KEY", exampleItem, Nothing, DateTime.Now.AddHours(1), System.Web.Caching.Cache.NoSlidingExpiration);
The exact same code should also work with HttpContext.Current.Cache.
Jim petkus
source share