How do I set the timelimit for a cache before it expires.
Currently my cache is handled by using HttpContext.Current.Cache[<keyname>] = object;
Using this method I cant see to add a time limit of expiration. How do I do this?
Previously I had used HttpContext.Current.Cache.Insert(<keyname>, object, null, DateTime.Now.AddMinutes(30), TimeSpan.Zero);
but that never worked, my object never got cached. I am using asp.net 2.0
Thanks