I am building an MVC web application, and I have a few objects in the cache inserted by the following statement:
HttpContext.Current.Cache.Insert("CacheKey", "CachedValue");
I know that I can add a timeout by using the following when inserting an item to the cache:
HttpContext.Current.Cache.Insert("CacheKey", "CachedValue", null, DateTime.Now.AddMilliseconds(10000), Cache.NoSlidingExpiration);
However, my specific requirements are updating the cache timeout once the items have been inserted in the cache. So basically, I need to add a timeout to an existing item in the cache. How would I go about in doing that?
Any help would be appreciated.